mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-03 14:46:56 +02:00
Synchronise composer and toolbar resizing animation duration
This commit is contained in:
@@ -54,7 +54,11 @@ enum MockComposerScreenState: MockScreenState, CaseIterable {
|
||||
[viewModel, wysiwygviewModel],
|
||||
AnyView(VStack {
|
||||
Spacer()
|
||||
Composer(viewModel: viewModel.context, wysiwygViewModel: wysiwygviewModel, sendMessageAction: { _ in }, showSendMediaActions: { })
|
||||
Composer(viewModel: viewModel.context,
|
||||
wysiwygViewModel: wysiwygviewModel,
|
||||
resizeAnimationDuration: 0.1,
|
||||
sendMessageAction: { _ in },
|
||||
showSendMediaActions: { })
|
||||
}.frame(
|
||||
minWidth: 0,
|
||||
maxWidth: .infinity,
|
||||
|
||||
@@ -77,6 +77,7 @@ struct Composer: View {
|
||||
|
||||
@ObservedObject var viewModel: ComposerViewModelType.Context
|
||||
@ObservedObject var wysiwygViewModel: WysiwygComposerViewModel
|
||||
let resizeAnimationDuration: Double
|
||||
|
||||
let sendMessageAction: (WysiwygComposerContent) -> Void
|
||||
let showSendMediaActions: () -> Void
|
||||
@@ -138,7 +139,7 @@ struct Composer: View {
|
||||
}
|
||||
.clipShape(rect)
|
||||
.overlay(rect.stroke(borderColor, lineWidth: 1))
|
||||
.animation(.easeInOut(duration: 0.1), value: wysiwygViewModel.idealHeight)
|
||||
.animation(.easeInOut(duration: resizeAnimationDuration), value: wysiwygViewModel.idealHeight)
|
||||
.padding(.horizontal, horizontalPadding)
|
||||
.padding(.top, 8)
|
||||
.onTapGesture {
|
||||
|
||||
Reference in New Issue
Block a user