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
1 changed files with 6 additions and 6 deletions

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");