diff --git a/.editorconfig b/.editorconfig index 1606d61fc..c79c990fb 100644 --- a/.editorconfig +++ b/.editorconfig @@ -17,7 +17,7 @@ insert_final_newline = true charset = utf-8 indent_style = space indent_size = 4 -continuation_indent_size = 8 +continuation_indent_size = 4 [*.xml] continuation_indent_size = 4 diff --git a/app/build.gradle b/app/build.gradle index d2db96634..2a71b6468 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -64,7 +64,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.33.20' + implementation 'com.simplemobiletools:commons:5.33.26' implementation 'joda-time:joda-time:2.10.1' implementation 'androidx.multidex:multidex:2.0.1' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt index aefbf7dfe..82da11b7e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt @@ -544,21 +544,21 @@ class EventActivity : SimpleActivity() { } private fun showReminder1Dialog() { - showPickSecondsDialogHelper(mReminder1Minutes, showDuringDayOption = mIsAllDayEvent){ + showPickSecondsDialogHelper(mReminder1Minutes, showDuringDayOption = mIsAllDayEvent) { mReminder1Minutes = if (it == -1 || it == 0) it else it / 60 checkReminderTexts() } } private fun showReminder2Dialog() { - showPickSecondsDialogHelper(mReminder2Minutes, showDuringDayOption = mIsAllDayEvent){ + showPickSecondsDialogHelper(mReminder2Minutes, showDuringDayOption = mIsAllDayEvent) { mReminder2Minutes = if (it == -1 || it == 0) it else it / 60 checkReminderTexts() } } private fun showReminder3Dialog() { - showPickSecondsDialogHelper(mReminder3Minutes, showDuringDayOption = mIsAllDayEvent){ + showPickSecondsDialogHelper(mReminder3Minutes, showDuringDayOption = mIsAllDayEvent) { mReminder3Minutes = if (it == -1 || it == 0) it else it / 60 checkReminderTexts() } @@ -1060,6 +1060,20 @@ class EventActivity : SimpleActivity() { } val reminders = getReminders() + if (!event_all_day.isChecked) { + if (reminders.getOrNull(2)?.minutes ?: 0 < -1) { + reminders.removeAt(2) + } + + if (reminders.getOrNull(1)?.minutes ?: 0 < -1) { + reminders.removeAt(1) + } + + if (reminders.getOrNull(0)?.minutes ?: 0 < -1) { + reminders.removeAt(0) + } + } + val reminder1 = reminders.getOrNull(0) ?: Reminder(REMINDER_OFF, REMINDER_NOTIFICATION) val reminder2 = reminders.getOrNull(1) ?: Reminder(REMINDER_OFF, REMINDER_NOTIFICATION) val reminder3 = reminders.getOrNull(2) ?: Reminder(REMINDER_OFF, REMINDER_NOTIFICATION) diff --git a/build.gradle b/build.gradle index cb53b1c18..ce2f58d09 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.4.21' + ext.kotlin_version = '1.4.30' repositories { google()