From b2ac64240787411719ef2290574b9e8a1a618908 Mon Sep 17 00:00:00 2001 From: Pavel Holec Date: Tue, 21 Nov 2023 14:16:35 +0100 Subject: [PATCH] Remove basic Equatable conformance from Text that was causing wrong reevaluation --- Sources/Orbit/Components/Text.swift | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Sources/Orbit/Components/Text.swift b/Sources/Orbit/Components/Text.swift index afdce410edc..5db136fcbfa 100644 --- a/Sources/Orbit/Components/Text.swift +++ b/Sources/Orbit/Components/Text.swift @@ -35,10 +35,6 @@ public struct Text: View, FormattedTextBuildable, PotentiallyEmptyView { var isMonospacedDigit: Bool? var lineHeight: CGFloat? - var isEmpty: Bool { - content.isEmpty - } - // The Orbit Text consists of up to 3 layers: // // 1) SwiftUI.Text base layer, either: @@ -73,6 +69,10 @@ public struct Text: View, FormattedTextBuildable, PotentiallyEmptyView { ) } } + + var isEmpty: Bool { + content.isEmpty + } func text(textRepresentableEnvironment: TextRepresentableEnvironment, isConcatenated: Bool = false) -> SwiftUI.Text { if content.containsHtmlFormatting { @@ -335,14 +335,6 @@ extension Text: TextRepresentable { } } -// MARK: - Equatable -extension Text: Equatable { - - public static func == (lhs: Text, rhs: Text) -> Bool { - lhs.content == rhs.content - } -} - // MARK: - Previews struct TextPreviews: PreviewProvider {