mirror of
https://github.com/yattee/yattee.git
synced 2026-10-23 05:02:53 +00:00
Make a second login on an instance reachable and orderable
An additional login could be created but never selected: the legacy picker lists one entry per instance and always resolved to whichever account signed in first. Account rows gain a "Use This Account" action, and the subscriptions view reloads on the data context rather than on the legacy setting — two logins on the same instance map onto the same legacy value, so switching between them changed nothing on screen while writes went to the other account. Two devices migrating different legacy selections produced contexts with identical epoch timestamps, and each refused the other's: a permanent, silent divergence that both sides considered settled. Equal timestamps are now broken by the selected account's ID, on the incoming side and in the conflict resolver alike — a record that wins the upload must not be refused on arrival. Credential cleanup falls back to both managers whenever the backend cannot be resolved, not only when the account is unknown here: an instance deletion can arrive before the tombstone, and the credential was then left in the Keychain.
This commit is contained in:
@@ -502,8 +502,12 @@ struct SubscriptionsView: View {
|
||||
.onReceive(NotificationCenter.default.publisher(for: .watchHistoryDidChange)) { _ in
|
||||
loadWatchEntries()
|
||||
}
|
||||
.onChange(of: appEnvironment?.settingsManager.subscriptionAccount) { _, _ in
|
||||
// Clear cache and refresh when subscription account changes
|
||||
// The data context, not the legacy setting: two logins on
|
||||
// the same instance map onto the same legacy value, so
|
||||
// switching between them would change nothing here and this
|
||||
// view would keep showing the first account's subscriptions
|
||||
// while writes went to the second.
|
||||
.onReceive(NotificationCenter.default.publisher(for: .dataContextDidChange)) { _ in
|
||||
feedCache.handleAccountChange()
|
||||
subscriptions = []
|
||||
subscriptionsLoaded = false
|
||||
|
||||
Reference in New Issue
Block a user