mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-16 04:06:36 +00:00
Timeline: Fixes
This commit is contained in:
parent
2e23b08b88
commit
1bdd31e848
2 changed files with 5 additions and 1 deletions
|
@ -91,7 +91,10 @@ import SwiftUI
|
|||
private func fetchTag(id: String) async {
|
||||
guard let client else { return }
|
||||
do {
|
||||
tag = try await client.get(endpoint: Tags.tag(id: id))
|
||||
let tag: Tag = try await client.get(endpoint: Tags.tag(id: id))
|
||||
withAnimation {
|
||||
self.tag = tag
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ public actor TimelineCache {
|
|||
}
|
||||
|
||||
func setLatestSeenStatuses(_ statuses: [Status], for client: Client, filter: String) {
|
||||
var statuses = statuses.sorted(by: { $0.createdAt.asDate > $1.createdAt.asDate })
|
||||
if filter == "Home" {
|
||||
UserDefaults.standard.set(statuses.map{ $0.id }, forKey: "timeline-last-seen-\(client.id)")
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue