Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -844,22 +844,37 @@ class EventActivity : SimpleActivity() {
}

private fun showReminder1Dialog() {
showPickSecondsDialogHelper(mReminder1Minutes, showDuringDayOption = mIsAllDayEvent) {
mReminder1Minutes = if (it == -1 || it == 0) it else it / 60
showPickSecondsDialogHelper(
curMinutes = mReminder1Minutes,
showDuringDayOption = mIsAllDayEvent,
showAbsoluteDateTimeOption = true,
eventStartTS = mEvent.startTS
) { seconds ->
mReminder1Minutes = if (seconds == -1 || seconds == 0) seconds else seconds / 60
checkReminderTexts()
}
}

private fun showReminder2Dialog() {
showPickSecondsDialogHelper(mReminder2Minutes, showDuringDayOption = mIsAllDayEvent) {
mReminder2Minutes = if (it == -1 || it == 0) it else it / 60
showPickSecondsDialogHelper(
curMinutes = mReminder2Minutes,
showDuringDayOption = mIsAllDayEvent,
showAbsoluteDateTimeOption = true,
eventStartTS = mEvent.startTS
) { seconds ->
mReminder2Minutes = if (seconds == -1 || seconds == 0) seconds else seconds / 60
checkReminderTexts()
}
}

private fun showReminder3Dialog() {
showPickSecondsDialogHelper(mReminder3Minutes, showDuringDayOption = mIsAllDayEvent) {
mReminder3Minutes = if (it == -1 || it == 0) it else it / 60
showPickSecondsDialogHelper(
curMinutes = mReminder3Minutes,
showDuringDayOption = mIsAllDayEvent,
showAbsoluteDateTimeOption = true,
eventStartTS = mEvent.startTS
) { seconds ->
mReminder3Minutes = if (seconds == -1 || seconds == 0) seconds else seconds / 60
checkReminderTexts()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -885,22 +885,37 @@ class TaskActivity : SimpleActivity() {
}

private fun showReminder1Dialog() {
showPickSecondsDialogHelper(mReminder1Minutes, showDuringDayOption = mIsAllDayTask) {
mReminder1Minutes = if (it == -1 || it == 0) it else it / 60
showPickSecondsDialogHelper(
curMinutes = mReminder1Minutes,
showDuringDayOption = mIsAllDayTask,
showAbsoluteDateTimeOption = true,
eventStartTS = mTask.startTS
) { seconds ->
mReminder1Minutes = if (seconds == -1 || seconds == 0) seconds else seconds / 60
updateReminderTexts()
}
}

private fun showReminder2Dialog() {
showPickSecondsDialogHelper(mReminder2Minutes, showDuringDayOption = mIsAllDayTask) {
mReminder2Minutes = if (it == -1 || it == 0) it else it / 60
showPickSecondsDialogHelper(
curMinutes = mReminder2Minutes,
showDuringDayOption = mIsAllDayTask,
showAbsoluteDateTimeOption = true,
eventStartTS = mTask.startTS
) { seconds ->
mReminder2Minutes = if (seconds == -1 || seconds == 0) seconds else seconds / 60
updateReminderTexts()
}
}

private fun showReminder3Dialog() {
showPickSecondsDialogHelper(mReminder3Minutes, showDuringDayOption = mIsAllDayTask) {
mReminder3Minutes = if (it == -1 || it == 0) it else it / 60
showPickSecondsDialogHelper(
curMinutes = mReminder3Minutes,
showDuringDayOption = mIsAllDayTask,
showAbsoluteDateTimeOption = true,
eventStartTS = mTask.startTS
) { seconds ->
mReminder3Minutes = if (seconds == -1 || seconds == 0) seconds else seconds / 60
updateReminderTexts()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const val LAST_VIEW = 6
const val MONTHLY_DAILY_VIEW = 7

const val REMINDER_OFF = -1
const val REMINDER_USE_ABSOLUTE = -2
const val REMINDER_DEFAULT_VALUE = "$REMINDER_OFF,$REMINDER_OFF,$REMINDER_OFF"

const val OTHER_EVENT = 0
Expand Down
Loading