Skip to content

Commit

Permalink
refactor: Remove redundant code for replacing obj
Browse files Browse the repository at this point in the history
  • Loading branch information
Siobhan committed May 29, 2023
1 parent c4c40e0 commit 316276d
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,17 +361,12 @@ class RCTAztecView: Aztec.TextView {
}

public override func insertDictationResult(_ dictationResult: [UIDictationPhrase]) {
let objectPlaceholder = "\u{FFFC}"
let dictationText = dictationResult.reduce("") { $0 + $1.text }
isInsertingDictationResult = false

if let text = self.text {
self.text = text.replacingOccurrences(of: objectPlaceholder, with: "")
}

if let textRange = self.selectedTextRange {
self.replace(textRange, withText: dictationText)
}
self.replace(textRange, withText: dictationText)
}
}

// MARK: - Custom Edit Intercepts
Expand Down

0 comments on commit 316276d

Please sign in to comment.