Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-24 18:07:08 +08:00
parent 68872f7b14
commit e9b5cffa91
18 changed files with 326 additions and 366 deletions

View File

@@ -48,17 +48,17 @@ class LiveController extends CommonListController with AccountMixin {
bool customHandleResponse(bool isRefresh, Success response) {
if (isRefresh) {
final res = response.response;
if (res case final LiveIndexData data) {
if (data.hasMore == 0) {
if (res is LiveIndexData) {
if (res.hasMore == 0) {
isEnd = true;
}
topState.value = Pair(
first: data.followItem,
second: data.areaItem,
first: res.followItem,
second: res.areaItem,
);
} else if (res case final LiveSecondData data) {
count = data.count;
newTags = data.newTags;
} else if (res is LiveSecondData) {
count = res.count;
newTags = res.newTags;
if (sortType != null) {
tagIndex.value =
newTags?.indexWhere((e) => e.sortType == sortType) ?? -1;