Disable translations in DMs by default

There is an option to enable it now.

Changelog-Changed: Disable translations in DMs by default
This commit is contained in:
William Casarin
2023-04-06 12:07:01 -07:00
parent 7fb1bc48c4
commit 24c82293b3
7 changed files with 34 additions and 19 deletions

View File

@@ -25,6 +25,14 @@ struct DMView: View {
}
}
var dm_options: EventViewOptions {
if self.damus_state.settings.translate_dms {
return []
}
return [.no_translate]
}
var DM: some View {
HStack {
if is_ours {
@@ -33,7 +41,7 @@ struct DMView: View {
let should_show_img = should_show_images(settings: damus_state.settings, contacts: damus_state.contacts, ev: event, our_pubkey: damus_state.pubkey)
NoteContentView(damus_state: damus_state, event: event, show_images: should_show_img, size: .normal, artifacts: .just_content(event.get_content(damus_state.keypair.privkey)), options: [])
NoteContentView(damus_state: damus_state, event: event, show_images: should_show_img, size: .normal, artifacts: .just_content(event.get_content(damus_state.keypair.privkey)), options: dm_options)
.padding([.top, .leading, .trailing], 10)
.padding([.bottom], 25)
.background(VisualEffectView(effect: UIBlurEffect(style: .prominent))