mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-28 06:15:51 +08:00
opt onChangeAccount
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -191,12 +191,16 @@ class DynamicsController extends GetxController
|
||||
|
||||
@override
|
||||
Future<void> onRefresh() {
|
||||
_refreshFollowUp();
|
||||
return controller!.onRefresh();
|
||||
}
|
||||
|
||||
void _refreshFollowUp() {
|
||||
if (_showAllUp) {
|
||||
_upPage = 1;
|
||||
_cacheUpList = null;
|
||||
}
|
||||
queryFollowUp();
|
||||
return controller!.onRefresh();
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -235,5 +239,5 @@ class DynamicsController extends GetxController
|
||||
}
|
||||
|
||||
@override
|
||||
void onChangeAccount(bool isLogin) => onRefresh();
|
||||
void onChangeAccount(bool isLogin) => _refreshFollowUp();
|
||||
}
|
||||
|
||||
@@ -91,5 +91,5 @@ class DynamicsTabController
|
||||
}
|
||||
|
||||
@override
|
||||
void onChangeAccount(bool isLogin) => onRefresh();
|
||||
void onChangeAccount(bool isLogin) => onReload();
|
||||
}
|
||||
|
||||
@@ -143,5 +143,5 @@ class LiveController extends CommonListController with AccountMixin {
|
||||
}
|
||||
|
||||
@override
|
||||
void onChangeAccount(bool isLogin) => onRefresh();
|
||||
void onChangeAccount(bool isLogin) => onReload();
|
||||
}
|
||||
|
||||
@@ -42,16 +42,20 @@ class PgcController
|
||||
@override
|
||||
Future<void> onRefresh() {
|
||||
if (accountService.isLogin.value) {
|
||||
followPage = 1;
|
||||
followEnd = false;
|
||||
_refreshPgcFollow();
|
||||
}
|
||||
queryPgcFollow();
|
||||
if (showPgcTimeline) {
|
||||
queryPgcTimeline();
|
||||
}
|
||||
return super.onRefresh();
|
||||
}
|
||||
|
||||
void _refreshPgcFollow() {
|
||||
followPage = 1;
|
||||
followEnd = false;
|
||||
queryPgcFollow();
|
||||
}
|
||||
|
||||
// follow
|
||||
late int followPage = 1;
|
||||
late RxInt followCount = (-1).obs;
|
||||
@@ -147,9 +151,7 @@ class PgcController
|
||||
@override
|
||||
void onChangeAccount(bool isLogin) {
|
||||
if (isLogin) {
|
||||
followPage = 1;
|
||||
followEnd = false;
|
||||
queryPgcFollow();
|
||||
_refreshPgcFollow();
|
||||
} else {
|
||||
followState.value = LoadingState.loading();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user