mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 11:07:04 +05:30
android: allow existing scheduled work to be replaced
Without this we end up in situations where changes to constraints are not propagated immediately because of pre-scheduled work that is retained until it has run.
This commit is contained in:
parent
325aca2760
commit
fe1163be51
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ class MainActivity : ComponentActivity() {
|
||||||
WorkManager.getInstance(this@MainActivity)
|
WorkManager.getInstance(this@MainActivity)
|
||||||
.enqueueUniquePeriodicWork(
|
.enqueueUniquePeriodicWork(
|
||||||
"updateSavedPosts",
|
"updateSavedPosts",
|
||||||
ExistingPeriodicWorkPolicy.KEEP,
|
ExistingPeriodicWorkPolicy.REPLACE,
|
||||||
postUpdateWorkRequest,
|
postUpdateWorkRequest,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue