mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-26 02:01:02 +00:00
Composer: Fix account switcher in share sheet
This commit is contained in:
parent
59d8346bc8
commit
b7e7ee0736
2 changed files with 4 additions and 2 deletions
|
@ -103,5 +103,6 @@ extension View {
|
||||||
.environmentObject(Theme.shared)
|
.environmentObject(Theme.shared)
|
||||||
.environmentObject(AppAccountsManager.shared)
|
.environmentObject(AppAccountsManager.shared)
|
||||||
.environmentObject(PushNotificationsService.shared)
|
.environmentObject(PushNotificationsService.shared)
|
||||||
|
.environmentObject(AppAccountsManager.shared.currentClient)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ import UIKit
|
||||||
import StoreKit
|
import StoreKit
|
||||||
|
|
||||||
public struct StatusEditorView: View {
|
public struct StatusEditorView: View {
|
||||||
@EnvironmentObject private var appAccounnt: AppAccountsManager
|
@EnvironmentObject private var appAccounts: AppAccountsManager
|
||||||
@EnvironmentObject private var preferences: UserPreferences
|
@EnvironmentObject private var preferences: UserPreferences
|
||||||
@EnvironmentObject private var theme: Theme
|
@EnvironmentObject private var theme: Theme
|
||||||
@EnvironmentObject private var client: Client
|
@EnvironmentObject private var client: Client
|
||||||
|
@ -161,9 +161,10 @@ public struct StatusEditorView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.interactiveDismissDisabled(!viewModel.shouldDisplayDismissWarning)
|
.interactiveDismissDisabled(!viewModel.shouldDisplayDismissWarning)
|
||||||
.onChange(of: appAccounnt.currentClient) { newClient in
|
.onChange(of: appAccounts.currentClient) { newClient in
|
||||||
if viewModel.mode.isInShareExtension {
|
if viewModel.mode.isInShareExtension {
|
||||||
currentAccount.setClient(client: newClient)
|
currentAccount.setClient(client: newClient)
|
||||||
|
viewModel.client = newClient
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue