From d5df18d0298203f79e932f22c97476618bbdb71f Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Thu, 12 Jan 2023 20:53:09 -0500 Subject: [PATCH] Remove language tag when translation is enabled --- .../MastodonUI/View/Content/StatusView+ViewModel.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MastodonSDK/Sources/MastodonUI/View/Content/StatusView+ViewModel.swift b/MastodonSDK/Sources/MastodonUI/View/Content/StatusView+ViewModel.swift index 9774a411749..1501d3b361f 100644 --- a/MastodonSDK/Sources/MastodonUI/View/Content/StatusView+ViewModel.swift +++ b/MastodonSDK/Sources/MastodonUI/View/Content/StatusView+ViewModel.swift @@ -793,7 +793,10 @@ extension StatusView.ViewModel { $isContentReveal, $spoilerContent, $content, - $language + Publishers.CombineLatest($language, $translatedFromLanguage) + .map { language, translatedFromLanguage in + translatedFromLanguage != nil ? nil : language + } ) .map { isContentReveal, spoilerContent, content, language in var strings: [AttributedString] = []