mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: main: anim to top
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -139,12 +139,6 @@ class _MainAppState extends State<MainApp>
|
|||||||
} else {
|
} else {
|
||||||
dynamic currentPage = _mainController.pages[value];
|
dynamic currentPage = _mainController.pages[value];
|
||||||
|
|
||||||
if (currentPage is HomePage) {
|
|
||||||
_homeController.toTopOrRefresh();
|
|
||||||
} else if (currentPage is DynamicsPage) {
|
|
||||||
_dynamicController.toTopOrRefresh();
|
|
||||||
}
|
|
||||||
|
|
||||||
int now = DateTime.now().millisecondsSinceEpoch;
|
int now = DateTime.now().millisecondsSinceEpoch;
|
||||||
if (now - _lastSelectTime < 500) {
|
if (now - _lastSelectTime < 500) {
|
||||||
if (currentPage is HomePage) {
|
if (currentPage is HomePage) {
|
||||||
@@ -152,6 +146,12 @@ class _MainAppState extends State<MainApp>
|
|||||||
} else if (currentPage is DynamicsPage) {
|
} else if (currentPage is DynamicsPage) {
|
||||||
_dynamicController.onRefresh();
|
_dynamicController.onRefresh();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (currentPage is HomePage) {
|
||||||
|
_homeController.toTopOrRefresh();
|
||||||
|
} else if (currentPage is DynamicsPage) {
|
||||||
|
_dynamicController.toTopOrRefresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_lastSelectTime = now;
|
_lastSelectTime = now;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user