diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 9a8d410..7fc8766 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -176,8 +176,6 @@ dependencies { //-------------------Image Loading-------------------// implementation(libs.landscapist.coil) - implementation(libs.coil) - implementation(libs.compose.coil) //-------------------FIREBASE-------------------// "playstoreImplementation"(platform(libs.firebase.bom)) diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/common/CompositionLocals.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/common/CompositionLocals.kt index 31675b6..a8a38fa 100644 --- a/app/src/main/java/com/bobbyesp/metadator/presentation/common/CompositionLocals.kt +++ b/app/src/main/java/com/bobbyesp/metadator/presentation/common/CompositionLocals.kt @@ -60,6 +60,7 @@ fun AppLocalSettingsProvider( val appSettingsState = AppMainSettingsStateFlow.collectAsStateWithLifecycle().value val bottomSheetNavigator = rememberBottomSheetNavigator() val navController = rememberNavController(bottomSheetNavigator) + val imageLoader = ImageLoader.Builder(context) .memoryCache { MemoryCache.Builder(context) @@ -75,9 +76,10 @@ fun AppLocalSettingsProvider( .respectCacheHeaders(false) .allowHardware(true) .crossfade(true) - .bitmapFactoryMaxParallelism(8) + .bitmapFactoryMaxParallelism(12) .dispatcher(Dispatchers.IO) .build() + val config = LocalConfiguration.current val snackbarHostState = remember { SnackbarHostState() } val drawerState = rememberDrawerState(initialValue = DrawerValue.Closed) diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/HorizontalSongCard.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/HorizontalSongCard.kt index 6ba6543..9e09050 100644 --- a/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/HorizontalSongCard.kt +++ b/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/HorizontalSongCard.kt @@ -18,7 +18,7 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import com.bobbyesp.metadator.presentation.components.image.ArtworkAsyncImage +import com.bobbyesp.metadator.presentation.components.image.AsyncImage import com.bobbyesp.metadator.presentation.theme.MetadatorTheme import com.bobbyesp.ui.components.text.MarqueeText import com.bobbyesp.utilities.Time @@ -39,11 +39,11 @@ fun HorizontalSongCard( verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(4.dp) ) { - ArtworkAsyncImage( + AsyncImage( modifier = Modifier .size(64.dp) .padding(4.dp), - artworkPath = song.artworkPath + imageModel = song.artworkPath ) Column( horizontalAlignment = Alignment.Start, modifier = Modifier diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/VerticalSongCard.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/VerticalSongCard.kt index c7f7828..90d1276 100644 --- a/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/VerticalSongCard.kt +++ b/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/VerticalSongCard.kt @@ -15,7 +15,7 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import com.bobbyesp.metadator.presentation.components.image.ArtworkAsyncImage +import com.bobbyesp.metadator.presentation.components.image.AsyncImage import com.bobbyesp.metadator.presentation.theme.MetadatorTheme import com.bobbyesp.ui.components.text.MarqueeText import com.bobbyesp.utilities.model.Song @@ -32,11 +32,11 @@ fun VerticalSongCard( onClick = onClick ) { Column { - ArtworkAsyncImage( + AsyncImage( modifier = Modifier .fillMaxWidth() .aspectRatio(1f), - artworkPath = song.artworkPath + imageModel = song.artworkPath ) Column( horizontalAlignment = Alignment.Start, modifier = Modifier.padding(8.dp) diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/spotify/SpotifyHorizontalSongCard.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/spotify/SpotifyHorizontalSongCard.kt index 1af55fb..f1ac11a 100644 --- a/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/spotify/SpotifyHorizontalSongCard.kt +++ b/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/spotify/SpotifyHorizontalSongCard.kt @@ -21,7 +21,7 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import com.adamratzman.spotify.models.Track import com.bobbyesp.metadator.ext.formatArtistsName -import com.bobbyesp.metadator.presentation.components.image.ArtworkAsyncImage +import com.bobbyesp.metadator.presentation.components.image.AsyncImage import com.bobbyesp.ui.components.text.MarqueeText @OptIn(ExperimentalFoundationApi::class) @@ -63,9 +63,9 @@ fun SpotifyHorizontalSongCard( ) } Box(contentAlignment = Alignment.CenterStart) { - ArtworkAsyncImage( + AsyncImage( modifier = imageModifier.size(64.dp), - artworkPath = albumArtPath, + imageModel = albumArtPath, shape = MaterialTheme.shapes.extraSmall ) } diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/components/image/AsyncImage.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/components/image/AsyncImage.kt index 1ee6f3f..bb3392b 100644 --- a/app/src/main/java/com/bobbyesp/metadator/presentation/components/image/AsyncImage.kt +++ b/app/src/main/java/com/bobbyesp/metadator/presentation/components/image/AsyncImage.kt @@ -3,10 +3,10 @@ package com.bobbyesp.metadator.presentation.components.image import android.content.Context import android.graphics.Bitmap import android.graphics.drawable.BitmapDrawable -import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.rounded.ErrorOutline import androidx.compose.material.icons.rounded.MusicNote import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable @@ -18,168 +18,73 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.graphics.ColorFilter -import androidx.compose.ui.graphics.DefaultAlpha -import androidx.compose.ui.graphics.FilterQuality import androidx.compose.ui.graphics.Shape -import androidx.compose.ui.graphics.drawscope.DrawScope -import androidx.compose.ui.graphics.painter.Painter +import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.painterResource import coil.ImageLoader -import coil.compose.AsyncImage -import coil.compose.AsyncImagePainter import coil.request.ImageRequest import coil.request.SuccessResult -import com.bobbyesp.metadator.R import com.bobbyesp.ui.components.others.PlaceholderCreator +import com.skydoves.landscapist.ImageOptions +import com.skydoves.landscapist.coil.CoilImage +import com.skydoves.landscapist.coil.CoilImageState import com.skydoves.landscapist.coil.LocalCoilImageLoader @Composable -fun AsyncImageImpl( - model: Any, - contentDescription: String?, - modifier: Modifier = Modifier, - alignment: Alignment = Alignment.Center, - contentScale: ContentScale = ContentScale.Fit, - alpha: Float = DefaultAlpha, - transform: (AsyncImagePainter.State) -> AsyncImagePainter.State = AsyncImagePainter.DefaultTransform, - onState: ((AsyncImagePainter.State) -> Unit)? = null, - colorFilter: ColorFilter? = null, - filterQuality: FilterQuality = DrawScope.DefaultFilterQuality, - isPreview: Boolean = false, - context: Context = LocalContext.current -) { - // Create an ImageLoader if it doesn't exist yet and remember it with the current context. - val imageLoader = LocalCoilImageLoader.current - - if (isPreview) { - Image( - painter = painterResource(R.drawable.metadator_logo_foreground), - contentDescription = contentDescription, - modifier = modifier, - alignment = alignment, - contentScale = contentScale, - alpha = alpha, - colorFilter = colorFilter, - ) - } else { - AsyncImage( - model = model, - imageLoader = imageLoader ?: ImageLoader.Builder(context).build(), - onState = onState, - filterQuality = filterQuality, - transform = transform, - contentDescription = contentDescription, - modifier = modifier, - alignment = alignment, - contentScale = contentScale, - alpha = alpha, - colorFilter = colorFilter, - ) - } -} - - -@Composable -fun AsyncImageImpl( - model: Any, - contentDescription: String?, - modifier: Modifier = Modifier, - error: Painter? = null, - placeholder: Painter? = null, - fallback: Painter? = null, - onLoading: ((AsyncImagePainter.State.Loading) -> Unit)? = null, - onSuccess: ((AsyncImagePainter.State.Success) -> Unit)? = null, - onError: ((AsyncImagePainter.State.Error) -> Unit)? = null, - alignment: Alignment = Alignment.Center, - contentScale: ContentScale = ContentScale.Fit, - alpha: Float = DefaultAlpha, - colorFilter: ColorFilter? = null, - filterQuality: FilterQuality = DrawScope.DefaultFilterQuality, -) { - - val context = LocalContext.current - - val imageLoader = LocalCoilImageLoader.current - - val placeholderPainter = placeholder ?: painterResource(R.drawable.metadator_logo_foreground) - - AsyncImage( - model = model, - imageLoader = imageLoader ?: ImageLoader.Builder(context).build(), - filterQuality = filterQuality, - onError = onError, - onLoading = onLoading, - onSuccess = onSuccess, - fallback = fallback, - error = error, - placeholder = placeholderPainter, - contentDescription = contentDescription, - modifier = modifier, - alignment = alignment, - contentScale = contentScale, - alpha = alpha, - colorFilter = colorFilter - ) -} - -@Composable -fun ArtworkAsyncImage( +fun AsyncImage( modifier: Modifier = Modifier, + imageModel: Any? = null, imageModifier: Modifier = Modifier, shape: Shape = MaterialTheme.shapes.small, - artworkPath: Any? = null + placeholder: ImageVector = Icons.Rounded.MusicNote, + context: Context = LocalContext.current, + imageLoader: ImageLoader? = LocalCoilImageLoader.current, + onSuccessData: (CoilImageState.Success) -> Unit = { _ -> } ) { - var showArtwork by remember { mutableStateOf(true) } - - val model by remember(artworkPath) { - mutableStateOf(artworkPath) + val imageUrl: Any? by remember(imageModel) { + mutableStateOf(imageModel) } - LaunchedEffect(model) { - showArtwork = model != null - } - - if (model != null && showArtwork) { - Box( - modifier = modifier, - contentAlignment = Alignment.Center, - ) { - AsyncImageImpl( - modifier = imageModifier - .fillMaxSize() - .clip(shape), - model = model!!, - onState = { state -> - //if it was successful, don't show the placeholder, else show it - showArtwork = - state !is AsyncImagePainter.State.Error && state !is AsyncImagePainter.State.Empty - }, - contentDescription = "Song cover", - contentScale = ContentScale.Crop, - isPreview = false - ) - } - } else { - Box( - modifier = modifier, - contentAlignment = Alignment.Center, - ) { - PlaceholderCreator( - modifier = imageModifier - .fillMaxSize() - .clip(shape), - icon = Icons.Rounded.MusicNote, - colorful = false, - contentDescription = "Song cover placeholder" - ) - } + Box( + modifier = modifier.clip(shape), + contentAlignment = Alignment.Center, + ) { + CoilImage( + modifier = Modifier.fillMaxSize(), + imageModel = { imageUrl }, + imageOptions = ImageOptions( + contentDescription = null, + contentScale = ContentScale.Crop + ), + onImageStateChanged = { state -> + if (state is CoilImageState.Success) { + onSuccessData(state) + } + }, + loading = { + PlaceholderCreator( + modifier = imageModifier + .fillMaxSize(), + icon = placeholder, + colorful = false, + contentDescription = "Song cover placeholder" + ) + }, + failure = { + PlaceholderCreator( + modifier = imageModifier + .fillMaxSize(), + icon = Icons.Rounded.ErrorOutline, + colorful = false, + contentDescription = "Song cover failed to load" + ) + }, + imageLoader = { imageLoader ?: ImageLoader(context) }, + ) } } - @Composable fun loadBitmapFromUrl(url: String): Bitmap? { var bitmap by remember { mutableStateOf(null) } diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/MediaStorePage.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/MediaStorePage.kt index 84e217e..f79e6d5 100644 --- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/MediaStorePage.kt +++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/MediaStorePage.kt @@ -67,6 +67,7 @@ fun MediaStorePage( LazyVerticalGridScrollbar( state = lazyGridState, settings = ScrollbarSettings( + thumbUnselectedColor = MaterialTheme.colorScheme.onSurfaceVariant, thumbSelectedColor = MaterialTheme.colorScheme.primary, selectionActionable = ScrollbarSelectionActionable.WhenVisible, ) @@ -101,6 +102,7 @@ fun MediaStorePage( LazyColumnScrollbar( state = lazyListState, settings = ScrollbarSettings( + thumbUnselectedColor = MaterialTheme.colorScheme.onSurfaceVariant, thumbSelectedColor = MaterialTheme.colorScheme.primary, selectionActionable = ScrollbarSelectionActionable.WhenVisible, ) diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/MediaplayerPage.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/MediaplayerPage.kt index 500b47b..b6d77ec 100644 --- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/MediaplayerPage.kt +++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/MediaplayerPage.kt @@ -128,6 +128,7 @@ fun MediaplayerPage( LazyColumnScrollbar( state = mediaStoreLazyColumnState, settings = ScrollbarSettings( + thumbUnselectedColor = MaterialTheme.colorScheme.onSurfaceVariant, thumbSelectedColor = MaterialTheme.colorScheme.primary, selectionActionable = ScrollbarSelectionActionable.WhenVisible, ), diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/MediaplayerViewModel.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/MediaplayerViewModel.kt index b384c01..7ba4f4e 100644 --- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/MediaplayerViewModel.kt +++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/MediaplayerViewModel.kt @@ -66,6 +66,7 @@ class MediaplayerViewModel @Inject constructor( calculateProgressValues(mediaState.progress) } } + is MediaState.Playing -> mutableMediaplayerPageState.update { (it.uiState as? PlayerState.Ready)?.let { readyState -> it.copy( @@ -80,6 +81,7 @@ class MediaplayerViewModel @Inject constructor( calculateProgressValues(mediaState.progress) } } + is MediaState.Ready -> { mutableMediaplayerPageState.update { it.copy( diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/MediaplayerConstants.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/MediaplayerConstants.kt index 5440329..e45c400 100644 --- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/MediaplayerConstants.kt +++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/MediaplayerConstants.kt @@ -10,7 +10,7 @@ import androidx.compose.ui.unit.dp import com.bobbyesp.ui.motion.materialSharedAxisXIn import com.bobbyesp.ui.motion.materialSharedAxisXOut -val CollapsedPlayerHeight = 78.dp +val CollapsedPlayerHeight = 84.dp val SeekToButtonSize = 48.dp val PlayerCommandsButtonSize = 48.dp diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/MediaplayerExpandedContent.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/MediaplayerExpandedContent.kt index cd36b08..4b6a03a 100644 --- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/MediaplayerExpandedContent.kt +++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/MediaplayerExpandedContent.kt @@ -46,7 +46,7 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.bobbyesp.metadator.R -import com.bobbyesp.metadator.presentation.components.image.ArtworkAsyncImage +import com.bobbyesp.metadator.presentation.components.image.AsyncImage import com.bobbyesp.metadator.presentation.pages.mediaplayer.MediaplayerViewModel import com.bobbyesp.metadator.presentation.pages.mediaplayer.player.MediaplayerSheetView import com.bobbyesp.metadator.presentation.pages.mediaplayer.player.PlayerControls @@ -99,8 +99,8 @@ fun MediaplayerExpandedContent( .weight(1f), contentAlignment = Alignment.Center, ) { - ArtworkAsyncImage( - artworkPath = playingSong?.artworkUri, + AsyncImage( + imageModel = playingSong?.artworkUri, modifier = Modifier .fillMaxHeight(0.9f) .aspectRatio(1f) @@ -192,8 +192,8 @@ fun MediaplayerExpandedContent( modifier = Modifier, verticalArrangement = Arrangement.spacedBy(24.dp) ) { - ArtworkAsyncImage( - artworkPath = playingSong?.artworkUri, + AsyncImage( + imageModel = playingSong?.artworkUri, modifier = Modifier .fillMaxWidth() .aspectRatio(1f) diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/MiniplayerContent.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/MiniplayerContent.kt index ec282b3..a07e7c8 100644 --- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/MiniplayerContent.kt +++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/MiniplayerContent.kt @@ -30,7 +30,7 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.media3.common.MediaMetadata import com.bobbyesp.metadator.R -import com.bobbyesp.metadator.presentation.components.image.ArtworkAsyncImage +import com.bobbyesp.metadator.presentation.components.image.AsyncImage import com.bobbyesp.metadator.presentation.pages.mediaplayer.player.AnimatedTextContentTransformation import com.bobbyesp.ui.components.button.DynamicButton import com.bobbyesp.ui.components.text.MarqueeText @@ -70,11 +70,11 @@ fun MiniplayerContent( verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(4.dp) ) { - ArtworkAsyncImage( + AsyncImage( modifier = Modifier .size(52.dp) .clip(MaterialTheme.shapes.extraSmall), - artworkPath = songCardArtworkUri + imageModel = songCardArtworkUri ) Column( horizontalAlignment = Alignment.Start, diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/PlayerQueue.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/PlayerQueue.kt index 6f12490..1fe6f7d 100644 --- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/PlayerQueue.kt +++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/PlayerQueue.kt @@ -11,7 +11,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.unit.dp import androidx.media3.common.MediaMetadata -import com.bobbyesp.metadator.presentation.components.image.ArtworkAsyncImage +import com.bobbyesp.metadator.presentation.components.image.AsyncImage @Composable fun PlayerQueue( @@ -32,8 +32,8 @@ fun PlayerQueue( .fillMaxWidth() .padding(24.dp) ) { - ArtworkAsyncImage( - artworkPath = nowPlaying?.artworkUri, + AsyncImage( + imageModel = nowPlaying?.artworkUri, modifier = imageModifier .clip(MaterialTheme.shapes.small) ) diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/ID3MetadataEditorPage.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/ID3MetadataEditorPage.kt index f83d9fc..f1ec5db 100644 --- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/ID3MetadataEditorPage.kt +++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/ID3MetadataEditorPage.kt @@ -66,7 +66,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.bobbyesp.metadator.R import com.bobbyesp.metadator.model.ParcelableSong import com.bobbyesp.metadator.presentation.common.LocalNavController -import com.bobbyesp.metadator.presentation.components.image.ArtworkAsyncImage +import com.bobbyesp.metadator.presentation.components.image.AsyncImage import com.bobbyesp.metadator.presentation.pages.utilities.tageditor.spotify.SpMetadataBottomSheetContent import com.bobbyesp.ui.components.button.CloseButton import com.bobbyesp.ui.components.others.MetadataTag @@ -269,12 +269,12 @@ fun ID3MetadataEditorPage( .aspectRatio(1f) .align(Alignment.CenterHorizontally), ) { - ArtworkAsyncImage( + AsyncImage( modifier = Modifier .fillMaxSize() .clip(MaterialTheme.shapes.small) .align(Alignment.Center), - artworkPath = artworkUri, + imageModel = artworkUri, ) Box( modifier = Modifier diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/ID3MetadataEditorPageViewModel.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/ID3MetadataEditorPageViewModel.kt index 065dd3c..ed41ff0 100644 --- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/ID3MetadataEditorPageViewModel.kt +++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/ID3MetadataEditorPageViewModel.kt @@ -165,6 +165,7 @@ class ID3MetadataEditorPageViewModel @Inject constructor( ) } } + private fun updateState(state: ID3MetadataEditorPageState) { mutablePageViewState.update { it.copy( diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/spotify/stages/SpMetadataBsDetails.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/spotify/stages/SpMetadataBsDetails.kt index 8c86a84..e60ed18 100644 --- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/spotify/stages/SpMetadataBsDetails.kt +++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/spotify/stages/SpMetadataBsDetails.kt @@ -37,7 +37,7 @@ import com.bobbyesp.metadator.R import com.bobbyesp.metadator.ext.TagLib.toImageVector import com.bobbyesp.metadator.ext.TagLib.toLocalizedName import com.bobbyesp.metadator.ext.formatArtistsName -import com.bobbyesp.metadator.presentation.components.image.ArtworkAsyncImage +import com.bobbyesp.metadator.presentation.components.image.AsyncImage import com.bobbyesp.metadator.presentation.pages.utilities.tageditor.spotify.SpMetadataBottomSheetContentViewModel import com.bobbyesp.ui.components.button.BackButton import com.bobbyesp.ui.components.others.SelectableSurface @@ -173,9 +173,9 @@ private fun TrackInfo( modifier = modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically ) { - ArtworkAsyncImage( + AsyncImage( modifier = Modifier.size(64.dp), - artworkPath = albumArtPath, + imageModel = albumArtPath, shape = MaterialTheme.shapes.extraSmall ) Row( diff --git a/app/ui/src/main/java/com/bobbyesp/ui/components/text/MarqueeText.kt b/app/ui/src/main/java/com/bobbyesp/ui/components/text/MarqueeText.kt index 88f150a..0a6da3c 100644 --- a/app/ui/src/main/java/com/bobbyesp/ui/components/text/MarqueeText.kt +++ b/app/ui/src/main/java/com/bobbyesp/ui/components/text/MarqueeText.kt @@ -216,5 +216,6 @@ data class MarqueeTextGradientOptions( val right: Boolean = true, val left: Boolean = true ) + private enum class MarqueeLayers { MainText, SecondaryText, EdgesGradient } private data class TextLayoutInfo(val textWidth: Int, val containerWidth: Int) \ No newline at end of file