From 2def9da08446bb86e55fcfd939b59cb67fa442f9 Mon Sep 17 00:00:00 2001 From: althafvly Date: Wed, 3 Jul 2024 19:25:48 +0530 Subject: [PATCH] disable back press on details page --- app/src/main/java/io/heckel/ntfy/ui/DetailActivity.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/io/heckel/ntfy/ui/DetailActivity.kt b/app/src/main/java/io/heckel/ntfy/ui/DetailActivity.kt index 5530b27..5011e7b 100644 --- a/app/src/main/java/io/heckel/ntfy/ui/DetailActivity.kt +++ b/app/src/main/java/io/heckel/ntfy/ui/DetailActivity.kt @@ -87,6 +87,10 @@ class DetailActivity : AppCompatActivity(), ActionMode.Callback, NotificationFra } } + override fun onBackPressed() { + finishAffinity() + } + private fun maybeSubscribeAndLoadView(url: Uri) { if (url.pathSegments.size != 1) { Log.w(TAG, "Invalid link $url. Aborting.")