File tree Expand file tree Collapse file tree
app/src/main/java/at/bitfire/icsdroid Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import at.bitfire.icsdroid.calendar.LocalCalendar
1818import at.bitfire.icsdroid.db.AppDatabase
1919import at.bitfire.icsdroid.db.entity.Subscription
2020import at.bitfire.icsdroid.ui.NotificationUtils
21+ import kotlinx.coroutines.currentCoroutineContext
2122import kotlinx.coroutines.job
2223import javax.inject.Inject
2324import kotlin.coroutines.cancellation.CancellationException
@@ -50,7 +51,7 @@ abstract class BaseSyncWorker(
5051 Log .d(Constants .TAG , " Previous worker stop reason: $stopReason " )
5152
5253 // Observe cancellation
53- coroutineContext .job.invokeOnCompletion { e ->
54+ currentCoroutineContext() .job.invokeOnCompletion { e ->
5455 if (e is CancellationException )
5556 Log .e(Constants .TAG , " Worker cancelled with reason: $stopReason " )
5657 }
You can’t perform that action at this time.
0 commit comments