mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Feed calculation logic change
This commit is contained in:
parent
ee9e8bc064
commit
4c0fae19ee
@ -130,7 +130,9 @@ final class FeedModel: ObservableObject, CacheModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let byChannel = Dictionary(grouping: unwatched) { $0.channel.id }.mapValues(\.count)
|
let byChannel = Dictionary(grouping: unwatched) { $0.channel.id }.mapValues(\.count)
|
||||||
self.unwatchedByChannel[account] = byChannel
|
if self.unwatchedByChannel[account] != byChannel {
|
||||||
|
self.unwatchedByChannel[account] = byChannel
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,8 +107,6 @@ extension PlayerModel {
|
|||||||
self.context.delete(watch)
|
self.context.delete(watch)
|
||||||
|
|
||||||
try? self.context.save()
|
try? self.context.save()
|
||||||
|
|
||||||
FeedModel.shared.calculateUnwatchedFeed()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,8 +42,6 @@ struct WatchView: View {
|
|||||||
} else {
|
} else {
|
||||||
Watch.markAsWatched(videoID: watch?.videoID ?? videoID, account: AccountsModel.shared.current, duration: watch?.videoDuration ?? duration, context: backgroundContext)
|
Watch.markAsWatched(videoID: watch?.videoID ?? videoID, account: AccountsModel.shared.current, duration: watch?.videoDuration ?? duration, context: backgroundContext)
|
||||||
}
|
}
|
||||||
|
|
||||||
FeedModel.shared.calculateUnwatchedFeed()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var imageSystemName: String {
|
var imageSystemName: String {
|
||||||
|
Loading…
Reference in New Issue
Block a user