From c637894b60cf7a786dbb7cc58d1bd6b5e71485e4 Mon Sep 17 00:00:00 2001 From: Bryan Montz Date: Tue, 24 Sep 2024 13:49:31 -0700 Subject: [PATCH] disable autocorrect on NoteComposer when running on macOS #1460 --- CHANGELOG.md | 1 + Nos/Views/NoteComposer/NoteUITextViewRepresentable.swift | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdd2a3e26..3f5713a93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added Delete Account UI. [#80](https://github.com/planetary-social/nos/issues/80) - Fixed issue where search results weren't sorted properly. [#1485](https://github.com/planetary-social/nos/issues/1485) - Delete all user data when logging out. [#1534](https://github.com/planetary-social/nos/issues/1534) +- Disable autocorrect on NoteComposer when running on macOS. [#1460](https://github.com/planetary-social/nos/issues/1460) ### Internal Changes - Use NIP-92 media metadata to display media in the proper orientation. Currently behind the “Enable new media display” feature flag. [#1172](https://github.com/planetary-social/nos/issues/1172) diff --git a/Nos/Views/NoteComposer/NoteUITextViewRepresentable.swift b/Nos/Views/NoteComposer/NoteUITextViewRepresentable.swift index 569a26bc5..ce36d4cb9 100644 --- a/Nos/Views/NoteComposer/NoteUITextViewRepresentable.swift +++ b/Nos/Views/NoteComposer/NoteUITextViewRepresentable.swift @@ -47,6 +47,10 @@ extension NoteTextEditor { .foregroundColor: UIColor.primaryTxt ] + if ProcessInfo.processInfo.isiOSAppOnMac { + view.autocorrectionType = .no + } + if showKeyboard { Task { try await Task.sleep(for: .milliseconds(200))