@StreamHandsOff( reason = "This class shouldn't be renamed without verifying it works correctly on Chat Client Artifacts because " + "we are using it by reflection" ) public class StreamCoilUserIconBuilder(private val context: Context) : UserIconBuilder { override suspend fun buildIcon(user: User): IconCompat? = StreamImageLoader .instance() .loadAsBitmap(context, user.image, StreamImageLoader.ImageTransformation.Circle) ?.let(IconCompat::createWithBitmap) }
Produces an [IconCompat] using Coil, which downloads and caches the user image.