Fix missing sync menu for fdroid

pull/935/head 8.0.1
Alex Baker 4 years ago
parent 3b2bf6a3a5
commit aeb3dd3c7a

@ -1,5 +1,9 @@
Change Log
---
### 8.0.1 (2020-02-16)
* Fix missing sync settings on fdroid
### 8.0 (2020-02-12)
* EteSync support

@ -36,8 +36,8 @@ android {
defaultConfig {
testApplicationId = "org.tasks.test"
applicationId = "org.tasks"
versionCode = 669
versionName = "8.0"
versionCode = 670
versionName = "8.0.1"
targetSdkVersion(Versions.targetSdk)
minSdkVersion(Versions.minSdk)
multiDexEnabled = true

@ -415,6 +415,19 @@ public class BasicPreferences extends InjectingPreferenceActivity
}
googleDriveBackup.setChecked(preferences.getBoolean(R.string.p_google_drive_backup, false));
PreferenceCategory synchronizationPreferences =
(PreferenceCategory) findPreference(R.string.synchronization);
synchronizationPreferences.removeAll();
boolean hasGoogleAccounts = addGoogleTasksAccounts(synchronizationPreferences);
boolean hasCaldavAccounts = addCaldavAccounts(synchronizationPreferences);
if (!hasGoogleAccounts) {
removeGroup(R.string.gtasks_GPr_header);
}
if (!(hasGoogleAccounts || hasCaldavAccounts)) {
removeGroup(R.string.sync_SPr_interval_title);
}
//noinspection ConstantConditions
if (!BuildConfig.FLAVOR.equals("googleplay")) {
return;
@ -482,19 +495,6 @@ public class BasicPreferences extends InjectingPreferenceActivity
});
int placeProvider = getPlaceProvider();
placeProviderPreference.setSummary(choices.get(placeProvider));
PreferenceCategory synchronizationPreferences =
(PreferenceCategory) findPreference(R.string.synchronization);
synchronizationPreferences.removeAll();
boolean hasGoogleAccounts = addGoogleTasksAccounts(synchronizationPreferences);
boolean hasCaldavAccounts = addCaldavAccounts(synchronizationPreferences);
if (!hasGoogleAccounts) {
removeGroup(R.string.gtasks_GPr_header);
}
if (!(hasGoogleAccounts || hasCaldavAccounts)) {
removeGroup(R.string.sync_SPr_interval_title);
}
}
private boolean addGoogleTasksAccounts(PreferenceCategory category) {

Loading…
Cancel
Save