Fix build

This commit is contained in:
Philipp Heckel 2025-09-01 14:23:56 -04:00
parent 2b16f96d5a
commit 537d45d2f5
4 changed files with 20 additions and 5 deletions

View file

@ -150,4 +150,8 @@ dependencies {
implementation 'io.noties.markwon:linkify:4.6.2'
implementation 'io.noties.markwon:ext-tables:4.6.2'
implementation 'io.noties.markwon:ext-strikethrough:4.6.2'
// Used by Markdown library, R8 complains if these are not here
implementation "pl.droidsonroids.gif:android-gif-drawable:1.2.29"
implementation "com.caverock:androidsvg:1.4"
}

View file

@ -1 +1,12 @@
# Keep readable stack traces
-dontobfuscate
-keepattributes SourceFile,LineNumberTable
# (From your case) ignore optional TLS providers pulled by OkHttp
-dontwarn org.conscrypt.**
-dontwarn org.bouncycastle.**
-dontwarn org.openjsse.**
# If you use Markwon GIF/SVG decoders:
-keep class pl.droidsonroids.gif.** { *; }
-keep class com.caverock.androidsvg.** { *; }

View file

@ -552,7 +552,7 @@ class SettingsActivity : AppCompatActivity(), PreferenceFragmentCompat.OnPrefere
}
}
// CanScheduleExactAlarms
// Update "Exact alarms" preference to match system setting
updateExactAlarmsPref()
// Version
@ -698,7 +698,7 @@ class SettingsActivity : AppCompatActivity(), PreferenceFragmentCompat.OnPrefere
}
exactAlarmsPref?.summary = if (canScheduleExactAlarms) getString(R.string.settings_advanced_exact_alarms_true) else getString(R.string.settings_advanced_exact_alarms_false)
exactAlarmsPref?.onPreferenceClickListener = OnPreferenceClickListener {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU && !canScheduleExactAlarms) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
startActivity(Intent(ACTION_REQUEST_SCHEDULE_EXACT_ALARM))
}
true

View file

@ -353,9 +353,9 @@
<string name="settings_advanced_connection_protocol_summary_ws">Use WebSockets to connect to the server. This is the recommended method, but may require additional config in your proxy.</string>
<string name="settings_advanced_connection_protocol_entry_jsonhttp">JSON stream over HTTP</string>
<string name="settings_advanced_connection_protocol_entry_ws">WebSockets</string>
<string name="settings_advanced_exact_alarms_title">Exact Alarms</string>
<string name="settings_advanced_exact_alarms_true">ntfy can schedule exact alarms (used to reconnect WebSockets in the background)</string>
<string name="settings_advanced_exact_alarms_false">ntfy CANNOT schedule exact alarms. Click to grant the permission now</string>
<string name="settings_advanced_exact_alarms_title">Exact alarms</string>
<string name="settings_advanced_exact_alarms_true">ntfy can schedule exact alarms. Exact alarms are required to reconnect WebSockets in the background. Click to revoke the permission.</string>
<string name="settings_advanced_exact_alarms_false">ntfy cannot schedule exact alarms. Exact alarms are required to reconnect WebSockets in the background. Click to grant the permission.</string>
<string name="settings_about_header">About</string>
<string name="settings_about_version_title">Version</string>
<string name="settings_about_version_format">ntfy %1$s (%2$s)</string>