1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-27 02:55:50 +01:00

Add preference to display changelog on startup

This commit is contained in:
José Rebelo 2023-05-14 11:13:44 +01:00
parent 7fb34eb262
commit 3799c51dc3
3 changed files with 11 additions and 1 deletions

View File

@ -362,7 +362,8 @@ public class ControlCenterv2 extends AppCompatActivity
}
GBChangeLog cl = createChangeLog();
if (cl.isFirstRun() && cl.hasChanges(cl.isFirstRunEver())) {
final boolean showChangelog = prefs.getBoolean("show_changelog", true);
if (showChangelog && cl.isFirstRun() && cl.hasChanges(cl.isFirstRunEver())) {
try {
cl.getMaterialLogDialog().show();
} catch (Exception ignored) {

View File

@ -1579,6 +1579,8 @@
<string name="error_background_service_reason">Starting the background service failed because of an exception. Error: </string>
<string name="pref_check_permission_status">Check permission status</string>
<string name="pref_check_permission_status_summary">Check and ask for missing permissions even when they might not be instantly needed. Disable this only if your devices actually doesn\'t support any of these features. Not granting a permission might cause issues!</string>
<string name="pref_show_changelog">Show changelog on startup</string>
<string name="pref_show_changelog_summary">Display the changelog since last version after Gadgetbridge is updated</string>
<string name="error_exporting_device_preferences">Error exporting device specific preferences</string>
<string name="error_setting_alias">Error setting alias: </string>
<string name="error_retrieving_devices_database">Error retrieving devices from database</string>

View File

@ -306,6 +306,13 @@
android:summary="@string/pref_check_permission_status_summary"
android:title="@string/pref_check_permission_status"
app:iconSpaceReserved="false" />
<SwitchPreference
android:defaultValue="true"
android:key="show_changelog"
android:layout="@layout/preference_checkbox"
android:summary="@string/pref_show_changelog_summary"
android:title="@string/pref_show_changelog"
app:iconSpaceReserved="false" />
<SwitchPreference
android:defaultValue="true"
android:key="cache_weather"