mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Add additional delete sync support.
This commit is contained in:
committed by
Greyson Parrelli
parent
d22d18da47
commit
c80ccd70ec
@@ -32,7 +32,7 @@ import org.thoughtcrime.securesms.R
|
||||
import org.thoughtcrime.securesms.compose.ComposeBottomSheetDialogFragment
|
||||
import org.thoughtcrime.securesms.dependencies.AppDependencies
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore
|
||||
import org.thoughtcrime.securesms.util.RemoteConfig
|
||||
import org.thoughtcrime.securesms.recipients.Recipient
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences
|
||||
|
||||
/**
|
||||
@@ -48,7 +48,7 @@ class DeleteSyncEducationDialog : ComposeBottomSheetDialogFragment() {
|
||||
fun shouldShow(): Boolean {
|
||||
return TextSecurePreferences.isMultiDevice(AppDependencies.application) &&
|
||||
!SignalStore.uiHints().hasSeenDeleteSyncEducationSheet &&
|
||||
RemoteConfig.deleteSyncEnabled
|
||||
Recipient.self().deleteSyncCapability.isSupported
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
|
||||
@@ -66,7 +66,7 @@ import org.thoughtcrime.securesms.database.MediaTable
|
||||
import org.thoughtcrime.securesms.keyvalue.KeepMessagesDuration
|
||||
import org.thoughtcrime.securesms.mediaoverview.MediaOverviewActivity
|
||||
import org.thoughtcrime.securesms.preferences.widgets.StorageGraphView
|
||||
import org.thoughtcrime.securesms.util.RemoteConfig
|
||||
import org.thoughtcrime.securesms.recipients.Recipient
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences
|
||||
import org.thoughtcrime.securesms.util.Util
|
||||
import org.thoughtcrime.securesms.util.viewModel
|
||||
@@ -138,7 +138,7 @@ class ManageStorageSettingsFragment : ComposeFragment() {
|
||||
dialog("confirm-delete-chat-history") {
|
||||
Dialogs.SimpleAlertDialog(
|
||||
title = stringResource(id = R.string.preferences_storage__delete_message_history),
|
||||
body = if (TextSecurePreferences.isMultiDevice(LocalContext.current) && RemoteConfig.deleteSyncEnabled) {
|
||||
body = if (TextSecurePreferences.isMultiDevice(LocalContext.current) && Recipient.self().deleteSyncCapability.isSupported) {
|
||||
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)
|
||||
@@ -154,7 +154,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 (TextSecurePreferences.isMultiDevice(LocalContext.current) && RemoteConfig.deleteSyncEnabled) {
|
||||
body = if (TextSecurePreferences.isMultiDevice(LocalContext.current) && Recipient.self().deleteSyncCapability.isSupported) {
|
||||
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)
|
||||
|
||||
@@ -341,7 +341,9 @@ class InternalConversationSettingsFragment : DSLSettingsFragment(
|
||||
|
||||
return if (capabilities != null) {
|
||||
TextUtils.concat(
|
||||
colorize("PaymentActivation", capabilities.paymentActivation)
|
||||
colorize("PaymentActivation", capabilities.paymentActivation),
|
||||
", ",
|
||||
colorize("DeleteSync", capabilities.deleteSync)
|
||||
)
|
||||
} else {
|
||||
"Recipient not found!"
|
||||
|
||||
Reference in New Issue
Block a user