Change to not deprecated 'WorkManager.getInstance'

Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
Tim Krüger 2022-08-29 15:35:20 +02:00
parent d8f37bec42
commit 1d0ff0bade
No known key found for this signature in database
GPG key ID: FECE3A7222C52A4E

View file

@ -534,7 +534,7 @@ class ConversationInfoController(args: Bundle) :
private fun leaveConversation() { private fun leaveConversation() {
workerData?.let { workerData?.let {
WorkManager.getInstance().enqueue( WorkManager.getInstance(context).enqueue(
OneTimeWorkRequest.Builder( OneTimeWorkRequest.Builder(
LeaveConversationWorker::class LeaveConversationWorker::class
.java .java
@ -597,7 +597,7 @@ class ConversationInfoController(args: Bundle) :
private fun deleteConversation() { private fun deleteConversation() {
workerData?.let { workerData?.let {
WorkManager.getInstance().enqueue( WorkManager.getInstance(context).enqueue(
OneTimeWorkRequest.Builder( OneTimeWorkRequest.Builder(
DeleteConversationWorker::class.java DeleteConversationWorker::class.java
).setInputData(it).build() ).setInputData(it).build()