chore: cleanup pt2

This commit is contained in:
rebelonion 2024-04-19 06:13:14 -05:00
parent 24147e746a
commit 70a50ece43
52 changed files with 501 additions and 294 deletions

View file

@ -21,11 +21,16 @@ interface TaskScheduler {
for (taskType in TaskType.entries) {
val interval = when (taskType) {
TaskType.COMMENT_NOTIFICATION -> CommentNotificationWorker.checkIntervals[PrefManager.getVal(
PrefName.CommentNotificationInterval)]
PrefName.CommentNotificationInterval
)]
TaskType.ANILIST_NOTIFICATION -> AnilistNotificationWorker.checkIntervals[PrefManager.getVal(
PrefName.AnilistNotificationInterval)]
PrefName.AnilistNotificationInterval
)]
TaskType.SUBSCRIPTION_NOTIFICATION -> SubscriptionNotificationWorker.checkIntervals[PrefManager.getVal(
PrefName.SubscriptionNotificationInterval)]
PrefName.SubscriptionNotificationInterval
)]
}
scheduleRepeatingTask(taskType, interval)
}
@ -62,6 +67,7 @@ interface TaskScheduler {
}
}
}
enum class TaskType {
COMMENT_NOTIFICATION,
ANILIST_NOTIFICATION,