Don't finish() explicitly

We are already observing the ViewModel.
Once the repo becomes null in the ViewModel.repoFlow, the observer will finish().
This commit is contained in:
Thore Goebel
2025-01-29 16:15:25 +01:00
parent d82905a19c
commit 0963118d32

View File

@@ -133,9 +133,9 @@ class RepoDetailsActivity : AppCompatActivity() {
MaterialAlertDialogBuilder(this)
.setTitle(R.string.repo_confirm_delete_title)
.setMessage(R.string.repo_confirm_delete_body)
.setPositiveButton(R.string.delete) { _, _ ->
.setPositiveButton(R.string.delete) { dialog, _ ->
viewModel.deleteRepository()
finish()
dialog.dismiss()
}
.setNegativeButton(android.R.string.cancel, null)
.show()