Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): keep iOS composer empty after sending an autocorrected word #30308

Mergedshivamhwp(GitHub profile, opens in a new tab)merged 8 commits intomain fromrefs/pull/30308/headmerged by shivamhwp(GitHub profile, opens in a new tab) View on GitHub

Showing 11 changed files with 175 additions and 3 deletions (loading 8).

x
0 of 11 viewed, 11 left
28 additions and 3 deletionsapps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swiftModified
View file
@@ -24,6 +24,7 @@
let tokensJson: String
let mostRecentEventCount: Int
let isNativeEcho: Bool
+ let resetGeneration: Int
​
private struct ComposerThemePayload: Decodable {
@@ -444,6 +445,7 @@
private var isReadOnly = false
private var isApplyingControlledValue = false
private var nativeEventCount = 0
+ private var resetGeneration = 0
private var lastContentSize = CGSize.zero
private var iconImages: [String: UIImage] = [:]
private var pendingIconUris = Set<String>()
@@ -489,6 +491,7 @@
var payload: [String: Any] = context
payload["value"] = self.textView.serializedText()
payload["eventCount"] = self.nativeEventCount
+ payload["resetGeneration"] = self.resetGeneration
payload["selection"] = ["start": selection.start, "end": selection.end]
self.onComposerPasteContext(payload)
@@ -499,6 +502,7 @@
self.onComposerPasteText([
"value": self.textView.serializedText(),