1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-29 05:16:51 +01:00

Fix disable log preference if log file not initialized

Regression introduced by 01b457895
This commit is contained in:
José Rebelo 2023-07-28 21:31:48 +01:00
parent f3c74267c5
commit fe95d9aaa8

View File

@ -187,6 +187,12 @@ public class SettingsActivity extends AbstractSettingsActivityV2 {
}
return true;
});
// If we didn't manage to initialize file logging, disable the preference
if (!GBApplication.getLogging().isFileLoggerInitialized()) {
pref.setEnabled(false);
pref.setSummary(R.string.pref_write_logfiles_not_available);
}
}
pref = findPreference("cache_weather");
@ -198,12 +204,6 @@ public class SettingsActivity extends AbstractSettingsActivityV2 {
return true;
});
// If we didn't manage to initialize file logging, disable the preference
if (!GBApplication.getLogging().isFileLoggerInitialized()) {
pref.setEnabled(false);
pref.setSummary(R.string.pref_write_logfiles_not_available);
}
}
pref = findPreference("language");