summaryrefslogtreecommitdiff
path: root/Hutch/Views/Lookup
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-12 23:19:20 -0500
committerChristian Cleberg <[email protected]>2026-04-12 23:19:20 -0500
commitee9f2904aa319231b7047fca3cb069f0c07019cd (patch)
tree69a18234512c63f38f0d477e0023969698ec3c9e /Hutch/Views/Lookup
parent72f860e0e171f6aac4e7d896e7a571147dbcb5c5 (diff)
downloadhutch-ee9f2904aa319231b7047fca3cb069f0c07019cd.tar.gz
hutch-ee9f2904aa319231b7047fca3cb069f0c07019cd.tar.bz2
hutch-ee9f2904aa319231b7047fca3cb069f0c07019cd.zip
feat: add multi-account support
Implements: https://todo.sr.ht/~ccleberg/hutch/49 Implements: https://todo.sr.ht/~ccleberg/hutch/50 Implements: https://todo.sr.ht/~ccleberg/hutch/51
Diffstat (limited to 'Hutch/Views/Lookup')
-rw-r--r--Hutch/Views/Lookup/LookupView.swift14
-rw-r--r--Hutch/Views/Lookup/UserProfileView.swift2
2 files changed, 8 insertions, 8 deletions
diff --git a/Hutch/Views/Lookup/LookupView.swift b/Hutch/Views/Lookup/LookupView.swift
index 6cefcf1..e53dd33 100644
--- a/Hutch/Views/Lookup/LookupView.swift
+++ b/Hutch/Views/Lookup/LookupView.swift
@@ -339,7 +339,7 @@ struct LookupView: View {
.navigationTitle("Look Up")
.task {
if viewModel == nil {
- viewModel = LookupViewModel(client: appState.client, appState: appState)
+ viewModel = LookupViewModel(client: appState.client, appState: appState, defaults: appState.accountDefaults)
}
}
}
@@ -440,16 +440,16 @@ struct LookupView: View {
ThreadDetailView(
thread: thread,
onViewed: {
- InboxReadStateStore.markViewed(max(Date(), thread.lastActivityAt), for: thread.id)
- NeedsAttentionSnapshotStore.adjustUnreadInboxThreads(by: -1)
+ InboxReadStateStore.markViewed(max(Date(), thread.lastActivityAt), for: thread.id, defaults: appState.accountDefaults)
+ NeedsAttentionSnapshotStore.adjustUnreadInboxThreads(by: -1, accountID: appState.activeAccountID)
},
onMarkRead: {
- InboxReadStateStore.markViewed(max(Date(), thread.lastActivityAt), for: thread.id)
- NeedsAttentionSnapshotStore.adjustUnreadInboxThreads(by: -1)
+ InboxReadStateStore.markViewed(max(Date(), thread.lastActivityAt), for: thread.id, defaults: appState.accountDefaults)
+ NeedsAttentionSnapshotStore.adjustUnreadInboxThreads(by: -1, accountID: appState.activeAccountID)
},
onMarkUnread: {
- InboxReadStateStore.markUnread(for: thread.id)
- NeedsAttentionSnapshotStore.adjustUnreadInboxThreads(by: 1)
+ InboxReadStateStore.markUnread(for: thread.id, defaults: appState.accountDefaults)
+ NeedsAttentionSnapshotStore.adjustUnreadInboxThreads(by: 1, accountID: appState.activeAccountID)
}
)
case .manPageBrowser:
diff --git a/Hutch/Views/Lookup/UserProfileView.swift b/Hutch/Views/Lookup/UserProfileView.swift
index 068e05f..84375de 100644
--- a/Hutch/Views/Lookup/UserProfileView.swift
+++ b/Hutch/Views/Lookup/UserProfileView.swift
@@ -2,7 +2,7 @@ import SwiftUI
struct UserProfileView: View {
@Environment(AppState.self) private var appState
- @AppStorage(AppStorageKeys.contributionGraphsEnabled) private var contributionGraphsEnabled = true
+ @AppStorage(AppStorageKeys.contributionGraphsEnabled, store: .standard) private var contributionGraphsEnabled = true
let user: User
@State private var profileViewModel: UserProfileViewModel?