diff --git a/dimensionhub/Views/Index/IndexMainView.swift b/dimensionhub/Views/Index/IndexMainView.swift index b124c7a..a67b1c1 100644 --- a/dimensionhub/Views/Index/IndexMainView.swift +++ b/dimensionhub/Views/Index/IndexMainView.swift @@ -30,6 +30,7 @@ struct IndexMainView: View { // 刷新逻辑 @State private var headerRefreshing: Bool = false + @State private var footerRefreshing: Bool = false @State private var noMore: Bool = false @@ -177,7 +178,7 @@ struct IndexMainView: View { return } - let task = Task { @MainActor in + Task { @MainActor in let num = await indexModel.loadMoreUpdateDramasTask(userId: self.userId) if num > 3 { self.hasMoreOldest = true diff --git a/dimensionhub/Views/Index/IndexModel.swift b/dimensionhub/Views/Index/IndexModel.swift index 2dc2084..7f6fa08 100644 --- a/dimensionhub/Views/Index/IndexModel.swift +++ b/dimensionhub/Views/Index/IndexModel.swift @@ -280,14 +280,14 @@ final class IndexModel { preloadGroupImages(groups: groups) displayDramaGroups(self.updateDramaGroups, label: "before") + self.updateDramaGroups = preappendMergeDramaGroups(groups: self.updateDramaGroups, mergeGroups: groups) self.fixedDramaGroup = self.updateDramaGroups.first - self.dramaGroupElements = transformUpdateDramaGroups(groups: self.updateDramaGroups) + displayDramaGroups(self.updateDramaGroups, label: "after") loadNum = groups.reduce(0, { acc, group in acc + group.items.count }) - // 处理回调 callback(true) } else {