We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c33946 commit e853748Copy full SHA for e853748
app/src/main/java/com/google/samples/apps/nowinandroid/util/ImageLoaderAsyncFactory.kt
@@ -55,5 +55,8 @@ class ImageLoaderAsyncFactory @Inject constructor(
55
* Most likely this will be already initialized by the time we want to show an image on the screen.
56
*/
57
override fun newImageLoader() =
58
- trace("NiaImageLoader.runBlocking") { runBlocking { asyncNewImageLoader.await() } }
+ trace("NiaImageLoader.runBlocking") {
59
+ if (asyncNewImageLoader.isCompleted) asyncNewImageLoader.getCompleted()
60
+ else runBlocking { asyncNewImageLoader.await() }
61
+ }
62
}
0 commit comments