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",
"state" : {
"branch" : "main",
"revision" : "8bddc899350d74f36ad17efc07d35152929bab64"
"revision" : "a4ba065a69e3376aeb45b32846d50fd71a7e20e3"
}
}
],

View File

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