Fix UriChatWallpaper loading issue where wrong thread was used for setting the imageView resource.

This commit is contained in:
Alex Hart 2023-09-01 10:42:19 -03:00 committed by Nicholas Tinsley
parent 133effccfc
commit 21b0a4d370

View file

@ -84,13 +84,12 @@ final class UriChatWallpaper implements ChatWallpaper, Parcelable {
@Override @Override
public boolean onResourceReady(Bitmap resource, Object model, Target<Bitmap> target, DataSource dataSource, boolean isFirstResource) { public boolean onResourceReady(Bitmap resource, Object model, Target<Bitmap> target, DataSource dataSource, boolean isFirstResource) {
Log.i(TAG, "Loaded wallpaper " + uri); Log.i(TAG, "Loaded wallpaper " + uri + " on " + Thread.currentThread().getName());
imageView.setImageBitmap(resource);
CACHE.put(uri, resource); CACHE.put(uri, resource);
return false; return false;
} }
}) })
.submit(); .into(imageView);
} }
} }