Remove permission, add tiny comments

This commit is contained in:
Philipp Heckel 2022-04-25 10:18:26 -04:00
parent 2814e9ea05
commit a4a66a1922
3 changed files with 3 additions and 2 deletions

View file

@ -10,7 +10,6 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28"/> <!-- Only required on SDK <= 28 --> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28"/> <!-- Only required on SDK <= 28 -->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/> <!-- To install packages downloaded through ntfy; craazyy! --> <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/> <!-- To install packages downloaded through ntfy; craazyy! -->
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/> <!-- To reschedule the websocket retry --> <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/> <!-- To reschedule the websocket retry -->
<uses-permission android:name="android.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS"/> <!-- To close the notification drawer, see UserActionWorker -->
<application <application
android:name=".app.Application" android:name=".app.Application"

View file

@ -101,6 +101,7 @@ class DetailActivity : AppCompatActivity(), ActionMode.Callback, NotificationFra
val topic = url.pathSegments.first() val topic = url.pathSegments.first()
title = topicShortUrl(baseUrl, topic) title = topicShortUrl(baseUrl, topic)
// Subscribe to topic if it doesn't already exist
lifecycleScope.launch(Dispatchers.IO) { lifecycleScope.launch(Dispatchers.IO) {
var subscription = repository.getSubscription(baseUrl, topic) var subscription = repository.getSubscription(baseUrl, topic)
if (subscription == null) { if (subscription == null) {
@ -140,6 +141,7 @@ class DetailActivity : AppCompatActivity(), ActionMode.Callback, NotificationFra
} }
} }
// Add extras needed in loadView(); normally these are added in MainActivity
intent.putExtra(MainActivity.EXTRA_SUBSCRIPTION_ID, subscription.id) intent.putExtra(MainActivity.EXTRA_SUBSCRIPTION_ID, subscription.id)
intent.putExtra(MainActivity.EXTRA_SUBSCRIPTION_BASE_URL, subscription.baseUrl) intent.putExtra(MainActivity.EXTRA_SUBSCRIPTION_BASE_URL, subscription.baseUrl)
intent.putExtra(MainActivity.EXTRA_SUBSCRIPTION_TOPIC, subscription.topic) intent.putExtra(MainActivity.EXTRA_SUBSCRIPTION_TOPIC, subscription.topic)

View file

@ -244,7 +244,7 @@
<string name="settings_notifications_priority_high">high</string> <string name="settings_notifications_priority_high">high</string>
<string name="settings_notifications_priority_max">max</string> <string name="settings_notifications_priority_max">max</string>
<string name="settings_notifications_channel_prefs_title">Channel settings</string> <string name="settings_notifications_channel_prefs_title">Channel settings</string>
<string name="settings_notifications_channel_prefs_summary">Manage Do Not Disturb (DND) override, custom sounds, etc.</string> <string name="settings_notifications_channel_prefs_summary">Do Not Disturb (DND) override, sounds, etc.</string>
<string name="settings_notifications_auto_download_title">Download attachments</string> <string name="settings_notifications_auto_download_title">Download attachments</string>
<string name="settings_notifications_auto_download_summary_always">Auto-download all attachments</string> <string name="settings_notifications_auto_download_summary_always">Auto-download all attachments</string>
<string name="settings_notifications_auto_download_summary_never">Never auto-download attachments</string> <string name="settings_notifications_auto_download_summary_never">Never auto-download attachments</string>