This repository has been archived by the owner on May 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1813 from openedx/farhan_ar/LEARNER-9527
fix: App Crashing on background for IAP users
- Loading branch information
Showing
3 changed files
with
18 additions
and
7 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
OpenEdXMobile/src/main/java/org/edx/mobile/extenstion/ContinuationExt.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.edx.mobile.extenstion | ||
|
||
import kotlinx.coroutines.CancellableContinuation | ||
import kotlin.coroutines.resume | ||
|
||
fun CancellableContinuation<Boolean>.resumeIfActive(value: Boolean) { | ||
if (isActive && isCompleted.not()) { | ||
resume(value) | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters