mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-22 08:20:59 +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(AppAccountsManager.shared)
|
||||
.environmentObject(PushNotificationsService.shared)
|
||||
.environmentObject(AppAccountsManager.shared.currentClient)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import UIKit
|
|||
import StoreKit
|
||||
|
||||
public struct StatusEditorView: View {
|
||||
@EnvironmentObject private var appAccounnt: AppAccountsManager
|
||||
@EnvironmentObject private var appAccounts: AppAccountsManager
|
||||
@EnvironmentObject private var preferences: UserPreferences
|
||||
@EnvironmentObject private var theme: Theme
|
||||
@EnvironmentObject private var client: Client
|
||||
|
@ -161,9 +161,10 @@ public struct StatusEditorView: View {
|
|||
}
|
||||
}
|
||||
.interactiveDismissDisabled(!viewModel.shouldDisplayDismissWarning)
|
||||
.onChange(of: appAccounnt.currentClient) { newClient in
|
||||
.onChange(of: appAccounts.currentClient) { newClient in
|
||||
if viewModel.mode.isInShareExtension {
|
||||
currentAccount.setClient(client: newClient)
|
||||
viewModel.client = newClient
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue