mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: use cascade (#812)
This commit is contained in:
committed by
GitHub
parent
877732e1e7
commit
6f69a45195
@@ -59,7 +59,8 @@ class LiveController
|
||||
}
|
||||
|
||||
late RxBool isLogin = Accounts.main.isLogin.obs;
|
||||
late Rx<LoadingState> followListState = LoadingState.loading().obs;
|
||||
late Rx<LoadingState<List<LiveFollowingItemModel>?>> followListState =
|
||||
Rx(LoadingState.loading());
|
||||
late int followPage = 1;
|
||||
late bool followEnd = false;
|
||||
late RxInt liveCount = 0.obs;
|
||||
@@ -93,9 +94,8 @@ class LiveController
|
||||
}
|
||||
followListState.value = LoadingState.success(dataList);
|
||||
} else if (followListState.value is Success) {
|
||||
List<LiveFollowingItemModel> list =
|
||||
(followListState.value as Success).response;
|
||||
list.addAll(dataList!);
|
||||
List<LiveFollowingItemModel> list = followListState.value.data!
|
||||
..addAll(dataList!);
|
||||
if (list.length >= liveCount.value) {
|
||||
followEnd = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user