mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-29 03:31:02 +00:00
Fix editor progress bar
This commit is contained in:
parent
e857439a02
commit
66754ecc7c
1 changed files with 90 additions and 88 deletions
|
@ -41,11 +41,9 @@ public extension StatusEditor {
|
|||
@Bindable var focusedSEVM = focusedSEVM
|
||||
|
||||
NavigationStack {
|
||||
ZStack(alignment: .top) {
|
||||
ScrollView {
|
||||
VStackLayout(spacing: 0) {
|
||||
if mainSEVM.isPosting {
|
||||
ProgressView(value: mainSEVM.postingProgress, total: 100.0)
|
||||
}
|
||||
EditorView(
|
||||
viewModel: mainSEVM,
|
||||
followUpSEVMs: $followUpSEVMs,
|
||||
|
@ -75,25 +73,25 @@ public extension StatusEditor {
|
|||
.scrollPosition(id: $scrollID, anchor: .top)
|
||||
.animation(.bouncy(duration: 0.3), value: editorFocusState)
|
||||
.animation(.bouncy(duration: 0.3), value: followUpSEVMs)
|
||||
#if !os(visionOS)
|
||||
#if !os(visionOS)
|
||||
.background(theme.primaryBackgroundColor)
|
||||
#endif
|
||||
#endif
|
||||
.safeAreaInset(edge: .bottom) {
|
||||
AutoCompleteView(viewModel: focusedSEVM)
|
||||
}
|
||||
#if os(visionOS)
|
||||
#if os(visionOS)
|
||||
.ornament(attachmentAnchor: .scene(.leading)) {
|
||||
AccessoryView(focusedSEVM: focusedSEVM,
|
||||
followUpSEVMs: $followUpSEVMs)
|
||||
}
|
||||
#else
|
||||
#else
|
||||
.safeAreaInset(edge: .bottom) {
|
||||
if presentationDetent == .large || presentationDetent == .medium {
|
||||
AccessoryView(focusedSEVM: focusedSEVM,
|
||||
followUpSEVMs: $followUpSEVMs)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
.accessibilitySortPriority(1) // Ensure that all elements inside the `ScrollView` occur earlier than the accessory views
|
||||
.navigationTitle(focusedSEVM.mode.title)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
|
@ -143,6 +141,10 @@ public extension StatusEditor {
|
|||
}
|
||||
}
|
||||
}
|
||||
if mainSEVM.isPosting {
|
||||
ProgressView(value: mainSEVM.postingProgress, total: 100.0)
|
||||
}
|
||||
}
|
||||
}
|
||||
.sheet(item: $editingMediaContainer) { container in
|
||||
StatusEditor.MediaEditView(viewModel: focusedSEVM, container: container)
|
||||
|
|
Loading…
Reference in a new issue