Timeline: Fixes
This commit is contained in:
parent
2e23b08b88
commit
1bdd31e848
|
@ -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 New Issue