Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions ios/RNTAztecView/RCTAztecView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class RCTAztecView: Aztec.TextView {
}()

private let formatStringMap: [FormattingIdentifier: String] = [
.bold: "Bold",
.bold: "bold",
.italic: "italic",
.strikethrough: "strikethrough",
.link: "link",
Expand Down Expand Up @@ -239,7 +239,7 @@ class RCTAztecView: Aztec.TextView {
} else {
identifiers = formattingIdentifiersForTypingAttributes()
}
let formats = identifiers.compactMap(formatString)
let formats = identifiers.compactMap { formatStringMap[$0] }
onActiveFormatsChange(["formats": formats])
}

Expand All @@ -250,10 +250,6 @@ class RCTAztecView: Aztec.TextView {
onActiveFormatAttributesChange?(["attributes": attributes])
}

private func formatString(from identifier: FormattingIdentifier) -> String? {
return formatStringMap[identifier]
}

func propagateSelectionChanges() {
guard let onSelectionChange = onSelectionChange else {
return
Expand Down