Fix scenario when user doesn't have prefs
This commit is contained in:
parent
1ba6cdf6f0
commit
d78ae83877
@ -128,15 +128,8 @@ public class SharingFragment extends PreferenceFragment implements SharedPrefere
|
||||
preferenceCategory.removePreference(removeManualLocation);
|
||||
preferenceCategory.removePreference(manualLocationButton);
|
||||
}else{
|
||||
if(predefinedCoordsList.isEmpty()){
|
||||
locationSharing.setEnabled(false);
|
||||
locationSharing.setChecked(false);
|
||||
PrefUtils.disableSharing(getApplicationContext());
|
||||
((MapActivity) getActivity()).handleBackgroundTaskLifeCycle();
|
||||
removeManualLocation.setEnabled(false);
|
||||
manualLocationList.setEnabled(false);
|
||||
manualLocationList.setSummary("");
|
||||
}else{
|
||||
if(!predefinedCoordsList.isEmpty()){
|
||||
|
||||
manualLocationList.setEnabled(true);
|
||||
manualLocationList.setSummary(PrefUtils.getCurrentManualLocationName(getApplicationContext()));
|
||||
removeManualLocation.setEnabled(true);
|
||||
@ -221,12 +214,6 @@ public class SharingFragment extends PreferenceFragment implements SharedPrefere
|
||||
if (!predefinedCoordsList.isEmpty()) {
|
||||
preferenceCategory.addPreference(manualLocationList);
|
||||
preferenceCategory.addPreference(removeManualLocation);
|
||||
}else{
|
||||
locationSharing.setEnabled(false);
|
||||
locationSharing.setChecked(false);
|
||||
PrefUtils.disableSharing(getApplicationContext());
|
||||
((MapActivity) getActivity()).handleBackgroundTaskLifeCycle();
|
||||
|
||||
}
|
||||
preferenceCategory.addPreference(manualLocationButton);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user