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 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
|
||||||
|
|||||||
@ -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 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user