mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-26 10:11:00 +00:00
Fix #1419
This commit is contained in:
parent
518e69d49d
commit
f08c90f8a0
2 changed files with 9 additions and 6 deletions
|
@ -10,7 +10,7 @@ struct StatusEditorMediaView: View {
|
|||
@Environment(Theme.self) private var theme
|
||||
@Environment(CurrentInstance.self) private var currentInstance
|
||||
var viewModel: StatusEditorViewModel
|
||||
@State private var editingContainer: StatusEditorMediaContainer?
|
||||
@Binding var editingContainer: StatusEditorMediaContainer?
|
||||
|
||||
@State private var isErrorDisplayed: Bool = false
|
||||
|
||||
|
@ -40,10 +40,6 @@ struct StatusEditorMediaView: View {
|
|||
}
|
||||
.padding(.horizontal, .layoutPadding)
|
||||
}
|
||||
.sheet(item: $editingContainer) { container in
|
||||
StatusEditorMediaEditView(viewModel: viewModel, container: container)
|
||||
.preferredColorScheme(theme.selectedScheme == .dark ? .dark : .light)
|
||||
}
|
||||
}
|
||||
|
||||
private func makeVideoAttachement(container: StatusEditorMediaContainer) -> some View {
|
||||
|
|
|
@ -27,6 +27,8 @@ public struct StatusEditorView: View {
|
|||
@State private var isDismissAlertPresented: Bool = false
|
||||
@State private var isLanguageConfirmPresented = false
|
||||
|
||||
@State private var editingContainer: StatusEditorMediaContainer?
|
||||
|
||||
public init(mode: StatusEditorViewModel.Mode) {
|
||||
_viewModel = .init(initialValue: .init(mode: mode))
|
||||
}
|
||||
|
@ -47,7 +49,8 @@ public struct StatusEditorView: View {
|
|||
.placeholder(String(localized: "status.editor.text.placeholder"))
|
||||
.setKeyboardType(preferences.isSocialKeyboardEnabled ? .twitter : .default)
|
||||
.padding(.horizontal, .layoutPadding)
|
||||
StatusEditorMediaView(viewModel: viewModel)
|
||||
StatusEditorMediaView(viewModel: viewModel,
|
||||
editingContainer: $editingContainer)
|
||||
if let status = viewModel.embeddedStatus {
|
||||
StatusEmbeddedView(status: status, client: client, routerPath: RouterPath())
|
||||
.padding(.horizontal, .layoutPadding)
|
||||
|
@ -166,6 +169,10 @@ public struct StatusEditorView: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
.sheet(item: $editingContainer) { container in
|
||||
StatusEditorMediaEditView(viewModel: viewModel, container: container)
|
||||
.preferredColorScheme(theme.selectedScheme == .dark ? .dark : .light)
|
||||
}
|
||||
.interactiveDismissDisabled(viewModel.shouldDisplayDismissWarning)
|
||||
.onChange(of: appAccounts.currentClient) { _, newValue in
|
||||
if viewModel.mode.isInShareExtension {
|
||||
|
|
Loading…
Reference in a new issue