Remove redundant rescheduling after reboot

The action is already performed via HabitsApplication.onCreate.
It is sufficient that there is a boot receiver.
pull/1509/head
Felix Wiemuth 3 years ago
parent 33100df633
commit 0d1d8a9eeb

@ -37,10 +37,6 @@ class ReminderController @Inject constructor(
private val notificationTray: NotificationTray, private val notificationTray: NotificationTray,
private val preferences: Preferences private val preferences: Preferences
) { ) {
fun onBootCompleted() {
reminderScheduler.scheduleAll()
}
fun onShowReminder( fun onShowReminder(
habit: Habit, habit: Habit,
timestamp: Timestamp, timestamp: Timestamp,

@ -96,7 +96,7 @@ class ReminderReceiver : BroadcastReceiver() {
} }
Intent.ACTION_BOOT_COMPLETED -> { Intent.ACTION_BOOT_COMPLETED -> {
Log.d("ReminderReceiver", "onBootCompleted") Log.d("ReminderReceiver", "onBootCompleted")
reminderController.onBootCompleted() // NOTE: Some activity is executed after boot through HabitsApplication, so receiving ACTION_BOOT_COMPLETED is essential.
} }
} }
} catch (e: RuntimeException) { } catch (e: RuntimeException) {

Loading…
Cancel
Save