do not show the Syncing... if no caldav calendar has been selected

This commit is contained in:
tibbi 2018-01-27 21:20:08 +01:00
parent 971c569cb0
commit 6b74fc4b2e
1 changed files with 4 additions and 0 deletions

View File

@ -159,6 +159,10 @@ class SettingsActivity : SimpleActivity() {
SelectCalendarsDialog(this) { SelectCalendarsDialog(this) {
val newCalendarIds = config.getSyncedCalendarIdsAsList() val newCalendarIds = config.getSyncedCalendarIdsAsList()
if (newCalendarIds.isEmpty() && !config.caldavSync) {
return@SelectCalendarsDialog
}
settings_manage_synced_calendars_holder.beVisibleIf(newCalendarIds.isNotEmpty()) settings_manage_synced_calendars_holder.beVisibleIf(newCalendarIds.isNotEmpty())
settings_caldav_sync.isChecked = newCalendarIds.isNotEmpty() settings_caldav_sync.isChecked = newCalendarIds.isNotEmpty()
config.caldavSync = newCalendarIds.isNotEmpty() config.caldavSync = newCalendarIds.isNotEmpty()