mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 22:03:55 +01:00
Fix document picker trigger bug (#5275)
* Revert "Reverta1b6973until we find out why it uses OPEN_DOCUMENT by default on fresh install" This reverts commit7ce3b7ebb1. * Potential fix for get_content picker being used in first run The initial state of the 'openDocumentPhotoPickerPref' seems to be incorrect during a fresh install on some devices. Try to ensure we always use the proper initial state by propagating the default to the preference access code. This hopefully fixes #5274
This commit is contained in:
parent
7ce3b7ebb1
commit
4540f54d59
5 changed files with 26 additions and 25 deletions
|
|
@ -171,10 +171,10 @@ public class SettingsFragment extends PreferenceFragmentCompat {
|
|||
return true;
|
||||
});
|
||||
|
||||
Preference getContentPickerPreference = findPreference("getContentPhotoPickerPref");
|
||||
getContentPickerPreference.setOnPreferenceChangeListener(
|
||||
Preference documentBasedPickerPreference = findPreference("openDocumentPhotoPickerPref");
|
||||
documentBasedPickerPreference.setOnPreferenceChangeListener(
|
||||
(preference, newValue) -> {
|
||||
boolean isGetContentPickerTurnedOn = (boolean) newValue;
|
||||
boolean isGetContentPickerTurnedOn = !(boolean) newValue;
|
||||
if (isGetContentPickerTurnedOn) {
|
||||
showLocationLossWarning();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue