@Composable private fun RecentTabIcon( url: String, modifier: Modifier = Modifier, contentScale: ContentScale = ContentScale.Fit, alignment: Alignment = Alignment.Center, icon: Bitmap? = null, ) { when { icon != null -> { Image( painter = BitmapPainter(icon.asImageBitmap()), contentDescription = null, modifier = modifier, contentScale = contentScale, alignment = alignment, ) } !inComposePreview -> { components.core.icons.Loader(url) { Placeholder { PlaceHolderTabIcon(modifier) } WithIcon { icon -> Image( painter = icon.painter, contentDescription = null, modifier = modifier, contentScale = contentScale, ) } } } else -> { PlaceHolderTabIcon(modifier) } } }
A recent tab icon.