Few keyboard fixes

This commit is contained in:
Thomas Ricouard 2023-01-22 17:17:33 +01:00
parent 3e3c109a84
commit 8680d2b83a
2 changed files with 8 additions and 4 deletions

View file

@ -69,7 +69,7 @@
"location" : "https://github.com/Dimillian/TextView", "location" : "https://github.com/Dimillian/TextView",
"state" : { "state" : {
"branch" : "main", "branch" : "main",
"revision" : "8bddc899350d74f36ad17efc07d35152929bab64" "revision" : "a4ba065a69e3376aeb45b32846d50fd71a7e20e3"
} }
} }
], ],

View file

@ -108,16 +108,18 @@ public struct ConversationDetailView: View {
} }
private var inputTextView: some View { private var inputTextView: some View {
VStack{ VStack {
HStack(spacing: 8) { HStack(alignment: .bottom, spacing: 8) {
Button { Button {
routerPath.presentedSheet = .replyToStatusEditor(status: viewModel.conversation.lastStatus) routerPath.presentedSheet = .replyToStatusEditor(status: viewModel.conversation.lastStatus)
} label: { } label: {
Image(systemName: "plus") Image(systemName: "plus")
} }
TextField("New messge", text: $viewModel.newMessageText, axis: .horizontal) .padding(.bottom, 5)
TextField("New messge", text: $viewModel.newMessageText, axis: .vertical)
.textFieldStyle(.roundedBorder) .textFieldStyle(.roundedBorder)
.focused($isMessageFieldFocused) .focused($isMessageFieldFocused)
.keyboardType(.default)
if !viewModel.newMessageText.isEmpty { if !viewModel.newMessageText.isEmpty {
Button { Button {
Task { Task {
@ -130,6 +132,8 @@ public struct ConversationDetailView: View {
Image(systemName: "paperplane") Image(systemName: "paperplane")
} }
} }
.keyboardShortcut("n", modifiers: .command)
.padding(.bottom, 5)
} }
} }
.padding(8) .padding(8)