Block user on the murena channel
This commit is contained in:
parent
3e28ee2722
commit
a9fa4fa0bf
2 changed files with 7 additions and 2 deletions
|
@ -76,8 +76,7 @@ class DetailActivity : AppCompatActivity(), ActionMode.Callback, NotificationFra
|
||||||
notifier = NotificationService(this)
|
notifier = NotificationService(this)
|
||||||
appBaseUrl = getString(R.string.app_base_url)
|
appBaseUrl = getString(R.string.app_base_url)
|
||||||
|
|
||||||
// Show 'Back' button
|
supportActionBar?.setDisplayHomeAsUpEnabled(false)
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
|
||||||
|
|
||||||
// Handle direct deep links to topic "ntfy://..."
|
// Handle direct deep links to topic "ntfy://..."
|
||||||
val url = intent?.data
|
val url = intent?.data
|
||||||
|
|
|
@ -207,6 +207,7 @@ class MainActivity : AppCompatActivity(), ActionMode.Callback, AddFragment.Subsc
|
||||||
val defaultTopic = TOPIC_MURENA
|
val defaultTopic = TOPIC_MURENA
|
||||||
val hasTestTopic = subscriptions.any { it.topic == defaultTopic }
|
val hasTestTopic = subscriptions.any { it.topic == defaultTopic }
|
||||||
if (hasTestTopic) {
|
if (hasTestTopic) {
|
||||||
|
showMurenaSub()
|
||||||
return@launch
|
return@launch
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,9 +231,14 @@ class MainActivity : AppCompatActivity(), ActionMode.Callback, AddFragment.Subsc
|
||||||
lastActive = Date().time / 1000
|
lastActive = Date().time / 1000
|
||||||
)
|
)
|
||||||
viewModel.add(subscription)
|
viewModel.add(subscription)
|
||||||
|
showMurenaSub()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private suspend fun showMurenaSub() {
|
||||||
|
startDetailView(repository.getSubscriptions().find { it.topic == "murena_notification" }!!)
|
||||||
|
}
|
||||||
|
|
||||||
private fun maybeRequestNotificationPermission() {
|
private fun maybeRequestNotificationPermission() {
|
||||||
// Android 13 (SDK 33) requires that we ask for permission to post notifications
|
// Android 13 (SDK 33) requires that we ask for permission to post notifications
|
||||||
// https://developer.android.com/develop/ui/views/notifications/notification-permission
|
// https://developer.android.com/develop/ui/views/notifications/notification-permission
|
||||||
|
|
Loading…
Reference in a new issue