apply the default calendar reminders where appropriate
This commit is contained in:
parent
2da1739431
commit
485b126d51
3 changed files with 7 additions and 1 deletions
|
@ -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<String>, grantResults: IntArray) {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -131,3 +131,4 @@ val OPERATION_UPDATE = 2
|
|||
val OPERATION_DELETE = 3
|
||||
val OVERRIDES = "overrides"
|
||||
val DEFAULT_REMINDERS = "defaultReminders"
|
||||
val USE_DEFAULT = "useDefault"
|
||||
|
|
Loading…
Reference in a new issue