fix for 6946

This commit is contained in:
Mauro Romito
2022-11-02 16:45:40 +01:00
parent bf767b1362
commit e97a4a81fb
8 changed files with 33 additions and 10 deletions
@@ -25,7 +25,6 @@ struct Composer: View {
@Environment(\.theme) private var theme: ThemeSwiftUI
@State private var focused = false
@State private var isActionButtonShowing = false
private let horizontalPadding: CGFloat = 12
@@ -60,7 +59,7 @@ struct Composer: View {
}
private var borderColor: Color {
focused ? theme.colors.quarterlyContent : theme.colors.quinaryContent
viewModel.focused ? theme.colors.quarterlyContent : theme.colors.quinaryContent
}
private var formatItems: [FormatItem] {
@@ -111,7 +110,7 @@ struct Composer: View {
}
HStack(alignment: .top, spacing: 0) {
WysiwygComposerView(
focused: $focused,
focused: $viewModel.focused,
viewModel: wysiwygViewModel
)
.tintColor(theme.colors.accent)
@@ -142,8 +141,8 @@ struct Composer: View {
.padding(.horizontal, horizontalPadding)
.padding(.top, 8)
.onTapGesture {
if !focused {
focused = true
if viewModel.focused {
viewModel.focused = true
}
}
HStack(spacing: 0) {