From 85b2b6cf996432414f815c7594134c6d4ca72101 Mon Sep 17 00:00:00 2001 From: Daniel Saidi Date: Mon, 22 Jan 2024 08:40:22 +0100 Subject: [PATCH] Remove platform check for component's set rich text attribute --- .../Component/RichTextViewComponent+Attributes.swift | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Sources/RichTextKit/Component/RichTextViewComponent+Attributes.swift b/Sources/RichTextKit/Component/RichTextViewComponent+Attributes.swift index 906cee263..e9c9df5a6 100644 --- a/Sources/RichTextKit/Component/RichTextViewComponent+Attributes.swift +++ b/Sources/RichTextKit/Component/RichTextViewComponent+Attributes.swift @@ -37,16 +37,11 @@ public extension RichTextViewComponent { _ attribute: RichTextAttribute, to value: Any ) { - #if macOS - setRichTextAttribute(attribute, to: value, at: selectedRange) - typingAttributes[attribute] = value - #else if hasSelectedRange { setRichTextAttribute(attribute, to: value, at: selectedRange) } else { typingAttributes[attribute] = value } - #endif } /// Set certain attributes at current range.