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 bdc717b..4d15463 100644 --- a/app/src/main/java/io/heckel/ntfy/ui/DetailActivity.kt +++ b/app/src/main/java/io/heckel/ntfy/ui/DetailActivity.kt @@ -76,8 +76,7 @@ class DetailActivity : AppCompatActivity(), ActionMode.Callback, NotificationFra notifier = NotificationService(this) appBaseUrl = getString(R.string.app_base_url) - // Show 'Back' button - supportActionBar?.setDisplayHomeAsUpEnabled(true) + supportActionBar?.setDisplayHomeAsUpEnabled(false) // Handle direct deep links to topic "ntfy://..." val url = intent?.data diff --git a/app/src/main/java/io/heckel/ntfy/ui/MainActivity.kt b/app/src/main/java/io/heckel/ntfy/ui/MainActivity.kt index b44acab..aa3bef6 100644 --- a/app/src/main/java/io/heckel/ntfy/ui/MainActivity.kt +++ b/app/src/main/java/io/heckel/ntfy/ui/MainActivity.kt @@ -207,6 +207,7 @@ class MainActivity : AppCompatActivity(), ActionMode.Callback, AddFragment.Subsc val defaultTopic = TOPIC_MURENA val hasTestTopic = subscriptions.any { it.topic == defaultTopic } if (hasTestTopic) { + showMurenaSub() return@launch } @@ -230,9 +231,14 @@ class MainActivity : AppCompatActivity(), ActionMode.Callback, AddFragment.Subsc lastActive = Date().time / 1000 ) viewModel.add(subscription) + showMurenaSub() } } + private suspend fun showMurenaSub() { + startDetailView(repository.getSubscriptions().find { it.topic == "murena_notification" }!!) + } + private fun maybeRequestNotificationPermission() { // Android 13 (SDK 33) requires that we ask for permission to post notifications // https://developer.android.com/develop/ui/views/notifications/notification-permission