mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-19 00:26:18 +08:00
mod: keep pgc index page
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -22,14 +22,19 @@ class PgcIndexPage extends StatefulWidget {
|
|||||||
State<PgcIndexPage> createState() => _PgcIndexPageState();
|
State<PgcIndexPage> createState() => _PgcIndexPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _PgcIndexPageState extends State<PgcIndexPage> {
|
class _PgcIndexPageState extends State<PgcIndexPage>
|
||||||
|
with AutomaticKeepAliveClientMixin {
|
||||||
late final _ctr = Get.put(
|
late final _ctr = Get.put(
|
||||||
PgcIndexController(widget.indexType),
|
PgcIndexController(widget.indexType),
|
||||||
tag: '${widget.indexType}',
|
tag: '${widget.indexType}',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool get wantKeepAlive => widget.indexType != null;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
super.build(context);
|
||||||
return widget.indexType == null
|
return widget.indexType == null
|
||||||
? Scaffold(
|
? Scaffold(
|
||||||
appBar: AppBar(title: const Text('索引')),
|
appBar: AppBar(title: const Text('索引')),
|
||||||
|
|||||||
Reference in New Issue
Block a user