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(removeManualLocation);
preferenceCategory.removePreference(manualLocationButton); preferenceCategory.removePreference(manualLocationButton);
}else{ }else{
if(predefinedCoordsList.isEmpty()){ if(!predefinedCoordsList.isEmpty()){
locationSharing.setEnabled(false);
locationSharing.setChecked(false);
PrefUtils.disableSharing(getApplicationContext());
((MapActivity) getActivity()).handleBackgroundTaskLifeCycle();
removeManualLocation.setEnabled(false);
manualLocationList.setEnabled(false);
manualLocationList.setSummary("");
}else{
manualLocationList.setEnabled(true); manualLocationList.setEnabled(true);
manualLocationList.setSummary(PrefUtils.getCurrentManualLocationName(getApplicationContext())); manualLocationList.setSummary(PrefUtils.getCurrentManualLocationName(getApplicationContext()));
removeManualLocation.setEnabled(true); removeManualLocation.setEnabled(true);
@ -221,12 +214,6 @@ public class SharingFragment extends PreferenceFragment implements SharedPrefere
if (!predefinedCoordsList.isEmpty()) { if (!predefinedCoordsList.isEmpty()) {
preferenceCategory.addPreference(manualLocationList); preferenceCategory.addPreference(manualLocationList);
preferenceCategory.addPreference(removeManualLocation); preferenceCategory.addPreference(removeManualLocation);
}else{
locationSharing.setEnabled(false);
locationSharing.setChecked(false);
PrefUtils.disableSharing(getApplicationContext());
((MapActivity) getActivity()).handleBackgroundTaskLifeCycle();
} }
preferenceCategory.addPreference(manualLocationButton); preferenceCategory.addPreference(manualLocationButton);
} else { } else {