From 3c24e707fc9c417d211318aae8437406aff912da Mon Sep 17 00:00:00 2001 From: William Casarin Date: Wed, 31 Jan 2024 09:34:02 -0800 Subject: [PATCH] translate: disable translate DMs It's just a bad idea until we have local translations Signed-off-by: William Casarin --- damus/Views/DMView.swift | 4 +++- damus/Views/DirectMessagesView.swift | 4 +++- damus/Views/Settings/TranslationSettingsView.swift | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/damus/Views/DMView.swift b/damus/Views/DMView.swift index add5b326..4951a32b 100644 --- a/damus/Views/DMView.swift +++ b/damus/Views/DMView.swift @@ -26,10 +26,12 @@ struct DMView: View { } var dm_options: EventViewOptions { + /* if self.damus_state.settings.translate_dms { return [] } - + */ + return [.no_translate] } diff --git a/damus/Views/DirectMessagesView.swift b/damus/Views/DirectMessagesView.swift index 2ff3da74..9783d896 100644 --- a/damus/Views/DirectMessagesView.swift +++ b/damus/Views/DirectMessagesView.swift @@ -44,10 +44,12 @@ struct DirectMessagesView: View { } var options: EventViewOptions { + /* if self.damus_state.settings.translate_dms { return [.truncate_content, .no_action_bar] } - + */ + return [.truncate_content, .no_action_bar, .no_translate] } diff --git a/damus/Views/Settings/TranslationSettingsView.swift b/damus/Views/Settings/TranslationSettingsView.swift index e2eedc00..225c0688 100644 --- a/damus/Views/Settings/TranslationSettingsView.swift +++ b/damus/Views/Settings/TranslationSettingsView.swift @@ -96,8 +96,10 @@ struct TranslationSettingsView: View { Toggle(NSLocalizedString("Automatically translate notes", comment: "Toggle to automatically translate notes."), isOn: $settings.auto_translate) .toggleStyle(.switch) + /* Toggle(NSLocalizedString("Translate DMs", comment: "Toggle to translate direct messages."), isOn: $settings.translate_dms) .toggleStyle(.switch) + */ } } }