mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 22:25:20 +00:00
Improve UI interactions (#390)
- Increase tap target size for back button in private message view - Limit @mentions autocomplete to top 4 matches for better usability Co-authored-by: jack <jackjackbits@users.noreply.github.com>
This commit is contained in:
@@ -393,7 +393,7 @@ struct ContentView: View {
|
|||||||
// @mentions autocomplete
|
// @mentions autocomplete
|
||||||
if viewModel.showAutocomplete && !viewModel.autocompleteSuggestions.isEmpty {
|
if viewModel.showAutocomplete && !viewModel.autocompleteSuggestions.isEmpty {
|
||||||
VStack(alignment: .leading, spacing: 0) {
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
ForEach(viewModel.autocompleteSuggestions, id: \.self) { suggestion in
|
ForEach(Array(viewModel.autocompleteSuggestions.prefix(4)), id: \.self) { suggestion in
|
||||||
Button(action: {
|
Button(action: {
|
||||||
_ = viewModel.completeNickname(suggestion, in: &messageText)
|
_ = viewModel.completeNickname(suggestion, in: &messageText)
|
||||||
}) {
|
}) {
|
||||||
@@ -1049,6 +1049,8 @@ struct ContentView: View {
|
|||||||
Image(systemName: "chevron.left")
|
Image(systemName: "chevron.left")
|
||||||
.font(.system(size: 12))
|
.font(.system(size: 12))
|
||||||
.foregroundColor(textColor)
|
.foregroundColor(textColor)
|
||||||
|
.frame(width: 44, height: 44, alignment: .leading)
|
||||||
|
.contentShape(Rectangle())
|
||||||
}
|
}
|
||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
.accessibilityLabel("Back to main chat")
|
.accessibilityLabel("Back to main chat")
|
||||||
|
|||||||
Reference in New Issue
Block a user