Merge branch 'fix-manual-without-pref' of s416084/find-my-tutor-android into develop

This commit is contained in:
Mieszko Wrzeszczyński 2019-01-06 23:06:13 +00:00 committed by Gogs
commit cf016bc6f4

View File

@ -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 {