Initial pass to properly check multi-device environment in various spots.

This commit is contained in:
Cody Henthorne
2025-07-25 12:19:59 -04:00
committed by GitHub
parent e458a5fdb3
commit 3b028d49a5
44 changed files with 93 additions and 66 deletions

View File

@@ -43,8 +43,7 @@ class DeleteSyncEducationDialog : ComposeBottomSheetDialogFragment() {
@JvmStatic
fun shouldShow(): Boolean {
return SignalStore.account.hasLinkedDevices &&
!SignalStore.uiHints.hasSeenDeleteSyncEducationSheet
return SignalStore.account.isMultiDevice && !SignalStore.uiHints.hasSeenDeleteSyncEducationSheet
}
@JvmStatic

View File

@@ -159,7 +159,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) {
body = if (SignalStore.account.isMultiDevice) {
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)
@@ -175,7 +175,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) {
body = if (SignalStore.account.isMultiDevice) {
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)