mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 17:45:19 +00:00
Fix build errors: wrap textInputAutocapitalization in iOS conditional
- textInputAutocapitalization is iOS-only API - Wrapped in #if os(iOS) to fix macOS build
This commit is contained in:
@@ -460,7 +460,9 @@ struct ContentView: View {
|
||||
.focused($isTextFieldFocused)
|
||||
.padding(.leading, 12)
|
||||
.autocorrectionDisabled(true)
|
||||
#if os(iOS)
|
||||
.textInputAutocapitalization(.never)
|
||||
#endif
|
||||
.onChange(of: messageText) { newValue in
|
||||
// Cancel previous debounce timer
|
||||
autocompleteDebounceTimer?.invalidate()
|
||||
@@ -801,7 +803,9 @@ struct ContentView: View {
|
||||
.foregroundColor(textColor)
|
||||
.focused($isNicknameFieldFocused)
|
||||
.autocorrectionDisabled(true)
|
||||
#if os(iOS)
|
||||
.textInputAutocapitalization(.never)
|
||||
#endif
|
||||
.onChange(of: isNicknameFieldFocused) { isFocused in
|
||||
if !isFocused {
|
||||
// Only validate when losing focus
|
||||
|
||||
Reference in New Issue
Block a user