Inline the deleteSync capability.

This commit is contained in:
Greyson Parrelli
2024-12-03 12:11:25 -05:00
parent f44d157f9a
commit a3af237397
20 changed files with 16 additions and 69 deletions

View File

@@ -31,7 +31,6 @@ import org.signal.core.ui.SignalPreview
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.compose.ComposeBottomSheetDialogFragment
import org.thoughtcrime.securesms.keyvalue.SignalStore
import org.thoughtcrime.securesms.recipients.Recipient
/**
* Show educational info about delete syncing to linked devices. This dialog uses a subject to convey when
@@ -45,8 +44,7 @@ class DeleteSyncEducationDialog : ComposeBottomSheetDialogFragment() {
@JvmStatic
fun shouldShow(): Boolean {
return SignalStore.account.hasLinkedDevices &&
!SignalStore.uiHints.hasSeenDeleteSyncEducationSheet &&
Recipient.self().deleteSyncCapability.isSupported
!SignalStore.uiHints.hasSeenDeleteSyncEducationSheet
}
@JvmStatic

View File

@@ -70,7 +70,6 @@ import org.thoughtcrime.securesms.keyvalue.KeepMessagesDuration
import org.thoughtcrime.securesms.keyvalue.SignalStore
import org.thoughtcrime.securesms.mediaoverview.MediaOverviewActivity
import org.thoughtcrime.securesms.preferences.widgets.StorageGraphView
import org.thoughtcrime.securesms.recipients.Recipient
import org.thoughtcrime.securesms.util.BottomSheetUtil
import org.thoughtcrime.securesms.util.Util
import org.thoughtcrime.securesms.util.viewModel
@@ -158,7 +157,7 @@ class ManageStorageSettingsFragment : ComposeFragment() {
dialog("confirm-delete-chat-history") {
Dialogs.SimpleAlertDialog(
title = stringResource(id = R.string.preferences_storage__delete_message_history),
body = if (SignalStore.account.hasLinkedDevices && Recipient.self().deleteSyncCapability.isSupported) {
body = if (SignalStore.account.hasLinkedDevices) {
stringResource(id = R.string.preferences_storage__this_will_delete_all_message_history_and_media_from_your_device_linked_device)
} else {
stringResource(id = R.string.preferences_storage__this_will_delete_all_message_history_and_media_from_your_device)
@@ -174,7 +173,7 @@ class ManageStorageSettingsFragment : ComposeFragment() {
dialog("double-confirm-delete-chat-history", dialogProperties = DialogProperties(dismissOnBackPress = true, dismissOnClickOutside = true)) {
Dialogs.SimpleAlertDialog(
title = stringResource(id = R.string.preferences_storage__are_you_sure_you_want_to_delete_all_message_history),
body = if (SignalStore.account.hasLinkedDevices && Recipient.self().deleteSyncCapability.isSupported) {
body = if (SignalStore.account.hasLinkedDevices) {
stringResource(id = R.string.preferences_storage__all_message_history_will_be_permanently_removed_this_action_cannot_be_undone_linked_device)
} else {
stringResource(id = R.string.preferences_storage__all_message_history_will_be_permanently_removed_this_action_cannot_be_undone)

View File

@@ -341,8 +341,6 @@ class InternalConversationSettingsFragment : DSLSettingsFragment(
return if (capabilities != null) {
TextUtils.concat(
colorize("DeleteSync", capabilities.deleteSync),
", ",
colorize("SSREv2", capabilities.storageServiceEncryptionV2)
)
} else {