fix
This commit is contained in:
parent
a0290cffbe
commit
ebdeb2f0ac
@ -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
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user