diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SettingsActivity.kt index adb6659df..715c447af 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SettingsActivity.kt @@ -392,7 +392,7 @@ class SettingsActivity : SimpleActivity() { reminderMinutes.add(it.minutes) } } - config.googleDefaultReminders = reminderMinutes.joinToString() + config.googleDefaultReminders = reminderMinutes.joinToString(",") } override fun onRequestPermissionsResult(requestCode: Int, permissions: Array, grantResults: IntArray) { diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/asynctasks/FetchGoogleEventsTask.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/asynctasks/FetchGoogleEventsTask.kt index ecc9559ea..96c86fbbf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/asynctasks/FetchGoogleEventsTask.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/asynctasks/FetchGoogleEventsTask.kt @@ -216,6 +216,11 @@ class FetchGoogleEventsTask(val context: Context, val googleSyncListener: Google reminderMinutes.add(minutes) } } + } else if (json?.has(USE_DEFAULT) == true) { + val minutes = context.config.googleDefaultReminders.splitToSequence(',') + minutes.forEach { + reminderMinutes.add(it.toInt()) + } } return reminderMinutes } diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/Constants.kt index 52d8392b8..be46055d7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/Constants.kt @@ -131,3 +131,4 @@ val OPERATION_UPDATE = 2 val OPERATION_DELETE = 3 val OVERRIDES = "overrides" val DEFAULT_REMINDERS = "defaultReminders" +val USE_DEFAULT = "useDefault"