Skip to content

Commit

Permalink
Remove permission, add tiny comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Heckel committed Apr 25, 2022
1 parent 2814e9e commit a4a66a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.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.BROADCAST_CLOSE_SYSTEM_DIALOGS"/> <!-- To close the notification drawer, see UserActionWorker -->

<application
android:name=".app.Application"
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/io/heckel/ntfy/ui/DetailActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class DetailActivity : AppCompatActivity(), ActionMode.Callback, NotificationFra
val topic = url.pathSegments.first()
title = topicShortUrl(baseUrl, topic)

// Subscribe to topic if it doesn't already exist
lifecycleScope.launch(Dispatchers.IO) {
var subscription = repository.getSubscription(baseUrl, topic)
if (subscription == null) {
Expand Down Expand Up @@ -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_BASE_URL, subscription.baseUrl)
intent.putExtra(MainActivity.EXTRA_SUBSCRIPTION_TOPIC, subscription.topic)
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
<string name="settings_notifications_priority_high">high</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_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_summary_always">Auto-download all attachments</string>
<string name="settings_notifications_auto_download_summary_never">Never auto-download attachments</string>
Expand Down

0 comments on commit a4a66a1

Please sign in to comment.