mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-24 18:11:03 +00:00
feat: move subscriptions to new notification method
This commit is contained in:
@@ -87,6 +87,7 @@ class App : MultiDexApplication() {
|
||||
|
||||
Logger.init(this)
|
||||
Thread.setDefaultUncaughtExceptionHandler(FinalExceptionHandler())
|
||||
Logger.log("App: Logging started")
|
||||
|
||||
initializeNetwork(baseContext)
|
||||
|
||||
@@ -122,22 +123,10 @@ class App : MultiDexApplication() {
|
||||
CommentsAPI.fetchAuthToken()
|
||||
}
|
||||
|
||||
startWorkers()
|
||||
}
|
||||
|
||||
private fun startWorkers() {
|
||||
val useAlarmManager = PrefManager.getVal<Boolean>(PrefName.UseAlarmManager)
|
||||
|
||||
TaskScheduler.create(this, useAlarmManager).scheduleAllTasks(this)
|
||||
|
||||
androidx.work.WorkManager.getInstance(this)
|
||||
.enqueue(OneTimeWorkRequest.Companion.from(CommentNotificationWorker::class.java))
|
||||
|
||||
androidx.work.WorkManager.getInstance(this)
|
||||
.enqueue(OneTimeWorkRequest.Companion.from(AnilistNotificationWorker::class.java))
|
||||
}
|
||||
|
||||
|
||||
private fun setupNotificationChannels() {
|
||||
try {
|
||||
Notifications.createChannels(this)
|
||||
|
||||
Reference in New Issue
Block a user