mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Convert ReminderScheduler
This commit is contained in:
@@ -80,7 +80,7 @@ class IntentScheduler
|
||||
return schedule(updateTime, intent, RTC)
|
||||
}
|
||||
|
||||
override fun log(componentName: String, msg: String) {
|
||||
override fun log(componentName: String?, msg: String?) {
|
||||
Log.d(componentName, msg)
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ class SnoozeDelayPickerActivity : FragmentActivity(), OnItemClickListener {
|
||||
override fun onItemClick(parent: AdapterView<*>?, view: View, position: Int, id: Long) {
|
||||
val snoozeValues = resources.getIntArray(R.array.snooze_picker_values)
|
||||
if (snoozeValues[position] >= 0) {
|
||||
reminderController!!.onSnoozeDelayPicked(habit, snoozeValues[position])
|
||||
reminderController!!.onSnoozeDelayPicked(habit!!, snoozeValues[position])
|
||||
finish()
|
||||
} else showTimePicker()
|
||||
}
|
||||
|
||||
@@ -54,9 +54,9 @@ class ReminderController @Inject constructor(
|
||||
showSnoozeDelayPicker(habit, context)
|
||||
}
|
||||
|
||||
fun onSnoozeDelayPicked(habit: Habit?, delayInMinutes: Int) {
|
||||
fun onSnoozeDelayPicked(habit: Habit, delayInMinutes: Int) {
|
||||
reminderScheduler.snoozeReminder(habit, delayInMinutes.toLong())
|
||||
notificationTray.cancel(habit!!)
|
||||
notificationTray.cancel(habit)
|
||||
}
|
||||
|
||||
fun onSnoozeTimePicked(habit: Habit?, hour: Int, minute: Int) {
|
||||
|
||||
Reference in New Issue
Block a user