Skip to content

Commit

Permalink
Always propagate BitmapProvider result callback on the Main Dispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
Nain57 committed Oct 20, 2024
1 parent 4646d01 commit f057021
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ fun ViewModel.getImageConditionBitmap(repository: IRepository, condition: ImageC
onCompleted.invoke(bitmap)
}
} catch (cEx: CancellationException) {
onCompleted.invoke(null)
withContext(Dispatchers.Main) {
onCompleted.invoke(null)
}
}
}

0 comments on commit f057021

Please sign in to comment.