Fix crash in internal backup settings on wipe and restore.

This commit is contained in:
Cody Henthorne
2025-12-10 10:24:37 -05:00
committed by Michelle Tang
parent 067a22ff90
commit 86aa866626

View File

@@ -198,9 +198,9 @@ class InternalBackupPlaygroundFragment : ComposeFragment() {
.setTitle("Are you sure?")
.setMessage("This will delete all of your chats! Make sure you've finished a backup first, we don't check for you. Only do this on a test device!")
.setPositiveButton("Wipe and restore") { _, _ ->
Toast.makeText(this@InternalBackupPlaygroundFragment.requireContext(), "Restoring backup...", Toast.LENGTH_SHORT).show()
Toast.makeText(context, "Restoring backup...", Toast.LENGTH_SHORT).show()
viewModel.wipeAllDataAndRestoreFromRemote {
startActivity(MainActivity.clearTop(this@InternalBackupPlaygroundFragment.requireActivity()))
context.startActivity(MainActivity.clearTop(context))
}
}
.show()