Skip to content

Commit

Permalink
fix: Disable New Notification API
Browse files Browse the repository at this point in the history
  • Loading branch information
HamzaIsrar12 committed Jul 13, 2024
1 parent ac9e58a commit 53364f2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ class RefreshFirebaseTokenWorker(context: Context, params: WorkerParameters) :
private const val WORKER_TAG = "RefreshFirebaseTokenWorker"

fun schedule(context: Context) {
val work = OneTimeWorkRequest
.Builder(RefreshFirebaseTokenWorker::class.java)
.addTag(WORKER_TAG)
.build()
WorkManager.getInstance(context).beginUniqueWork(
WORKER_TAG,
ExistingWorkPolicy.REPLACE,
work
).enqueue()
// val work = OneTimeWorkRequest
// .Builder(RefreshFirebaseTokenWorker::class.java)
// .addTag(WORKER_TAG)
// .build()
// WorkManager.getInstance(context).beginUniqueWork(
// WORKER_TAG,
// ExistingWorkPolicy.REPLACE,
// work
// ).enqueue()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ class SyncFirebaseTokenWorker(context: Context, params: WorkerParameters) :
private const val WORKER_TAG = "SyncFirebaseTokenWorker"

fun schedule(context: Context) {
val work = OneTimeWorkRequest
.Builder(SyncFirebaseTokenWorker::class.java)
.addTag(WORKER_TAG)
.build()
WorkManager.getInstance(context).beginUniqueWork(
WORKER_TAG,
ExistingWorkPolicy.REPLACE,
work
).enqueue()
// val work = OneTimeWorkRequest
// .Builder(SyncFirebaseTokenWorker::class.java)
// .addTag(WORKER_TAG)
// .build()
// WorkManager.getInstance(context).beginUniqueWork(
// WORKER_TAG,
// ExistingWorkPolicy.REPLACE,
// work
// ).enqueue()
}
}
}

0 comments on commit 53364f2

Please sign in to comment.