Add internal debug setting to archive session.

This commit is contained in:
Greyson Parrelli
2025-03-12 15:25:11 -04:00
parent 22d908385b
commit 6d956ca0f9
2 changed files with 40 additions and 2 deletions

View File

@@ -183,8 +183,8 @@ class InternalConversationSettingsFragment : DSLSettingsFragment(
)
clickPref(
title = DSLSettingsText.from("Delete Session"),
summary = DSLSettingsText.from("Deletes the session, essentially guaranteeing an encryption error if they send you a message."),
title = DSLSettingsText.from("Delete Sessions"),
summary = DSLSettingsText.from("Deletes all sessions with this recipient, essentially guaranteeing an encryption error if they send you a message."),
onClick = {
MaterialAlertDialogBuilder(requireContext())
.setTitle("Are you sure?")
@@ -200,6 +200,20 @@ class InternalConversationSettingsFragment : DSLSettingsFragment(
.show()
}
)
clickPref(
title = DSLSettingsText.from("Archive Sessions"),
summary = DSLSettingsText.from("Archives all sessions associated with this recipient, causing you to create a new session the next time you send a message (while not causing decryption errors)."),
onClick = {
MaterialAlertDialogBuilder(requireContext())
.setTitle("Are you sure?")
.setNegativeButton(android.R.string.cancel) { d, _ -> d.dismiss() }
.setPositiveButton(android.R.string.ok) { _, _ ->
AppDependencies.protocolStore.aci().sessions().archiveSessions(recipient.id)
}
.show()
}
)
}
clickPref(