Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
SeniorZhai committed Dec 20, 2024
1 parent eb12af7 commit 8975750
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/main/java/one/mixin/android/job/GenerateAvatarJob.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import coil3.imageLoader
import coil3.request.ImageRequest
import coil3.request.SuccessResult
import coil3.request.allowHardware
import coil3.toBitmap
import com.birbit.android.jobqueue.Params
import kotlinx.coroutines.runBlocking
import one.mixin.android.MixinApplication
Expand Down Expand Up @@ -371,7 +372,7 @@ class GenerateAvatarJob(
.build()

val result = applicationContext.imageLoader.execute(request)
val bitmap = (result as? SuccessResult)?.image?.asDrawable(MixinApplication.appContext.resources)?.toBitmap()
val bitmap = (result as? SuccessResult)?.image?.toBitmap()
if (bitmap != null) {
bitmaps.add(bitmap)
} else {
Expand Down

0 comments on commit 8975750

Please sign in to comment.