diff --git a/IceCubesShareExtension/ShareViewController.swift b/IceCubesShareExtension/ShareViewController.swift index aa27dc39..9528f41e 100644 --- a/IceCubesShareExtension/ShareViewController.swift +++ b/IceCubesShareExtension/ShareViewController.swift @@ -13,7 +13,8 @@ class ShareViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - let client = AppAccountsManager.shared.currentClient + let appAccountsManager = AppAccountsManager.shared + let client = appAccountsManager.currentClient let account = CurrentAccount.shared let instance = CurrentInstance.shared account.setClient(client: client) @@ -26,6 +27,7 @@ class ShareViewController: UIViewController { if let attachments = item.attachments { let view = StatusEditorView(mode: .shareExtension(items: attachments)) .environmentObject(UserPreferences.shared) + .environmentObject(appAccountsManager) .environmentObject(client) .environmentObject(account) .environmentObject(theme) diff --git a/Packages/Status/Sources/Status/Editor/StatusEditorViewModel.swift b/Packages/Status/Sources/Status/Editor/StatusEditorViewModel.swift index 46583259..1ac4b356 100644 --- a/Packages/Status/Sources/Status/Editor/StatusEditorViewModel.swift +++ b/Packages/Status/Sources/Status/Editor/StatusEditorViewModel.swift @@ -52,7 +52,7 @@ public class StatusEditorViewModel: ObservableObject { @Published var replyToStatus: Status? @Published var embededStatus: Status? var canPost: Bool { - statusText.length > 0 || !selectedMedias.isEmpty + statusText.length > 0 || !mediasImages.isEmpty } var shouldDisablePollButton: Bool {