This commit is contained in:
anlicheng 2025-07-30 11:56:34 +08:00
parent a0290cffbe
commit ebdeb2f0ac
2 changed files with 4 additions and 3 deletions

View File

@ -30,6 +30,7 @@ struct IndexMainView: View {
// //
@State private var headerRefreshing: Bool = false @State private var headerRefreshing: Bool = false
@State private var footerRefreshing: Bool = false @State private var footerRefreshing: Bool = false
@State private var noMore: Bool = false @State private var noMore: Bool = false
@ -177,7 +178,7 @@ struct IndexMainView: View {
return return
} }
let task = Task { @MainActor in Task { @MainActor in
let num = await indexModel.loadMoreUpdateDramasTask(userId: self.userId) let num = await indexModel.loadMoreUpdateDramasTask(userId: self.userId)
if num > 3 { if num > 3 {
self.hasMoreOldest = true self.hasMoreOldest = true

View File

@ -280,14 +280,14 @@ final class IndexModel {
preloadGroupImages(groups: groups) preloadGroupImages(groups: groups)
displayDramaGroups(self.updateDramaGroups, label: "before") displayDramaGroups(self.updateDramaGroups, label: "before")
self.updateDramaGroups = preappendMergeDramaGroups(groups: self.updateDramaGroups, mergeGroups: groups) self.updateDramaGroups = preappendMergeDramaGroups(groups: self.updateDramaGroups, mergeGroups: groups)
self.fixedDramaGroup = self.updateDramaGroups.first self.fixedDramaGroup = self.updateDramaGroups.first
self.dramaGroupElements = transformUpdateDramaGroups(groups: self.updateDramaGroups) self.dramaGroupElements = transformUpdateDramaGroups(groups: self.updateDramaGroups)
displayDramaGroups(self.updateDramaGroups, label: "after") displayDramaGroups(self.updateDramaGroups, label: "after")
loadNum = groups.reduce(0, { acc, group in acc + group.items.count }) loadNum = groups.reduce(0, { acc, group in acc + group.items.count })
// //
callback(true) callback(true)
} else { } else {