mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-06-05 21:49:48 +02:00
Fix disable log preference if log file not initialized
Regression introduced by 01b457895
This commit is contained in:
@@ -187,6 +187,12 @@ public class SettingsActivity extends AbstractSettingsActivityV2 {
|
|||||||
}
|
}
|
||||||
return true;
|
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");
|
pref = findPreference("cache_weather");
|
||||||
@@ -198,12 +204,6 @@ public class SettingsActivity extends AbstractSettingsActivityV2 {
|
|||||||
|
|
||||||
return true;
|
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");
|
pref = findPreference("language");
|
||||||
|
Reference in New Issue
Block a user