Desktop Bug Fixes , Desktop Res Added

This commit is contained in:
shabinder 2021-02-11 02:18:53 +05:30
parent 02e6ef3a47
commit 24ab7c562d
4 changed files with 11 additions and 7 deletions

View File

@ -23,10 +23,10 @@ kotlin {
implementation(Decompose.extensionsCompose) implementation(Decompose.extensionsCompose)
//Coil-Image Loading //Coil-Image Loading
Versions.coilVersion.let{ /*Versions.coilVersion.let{
implementation("dev.chrisbanes.accompanist:accompanist-coil:$it") implementation("dev.chrisbanes.accompanist:accompanist-coil:$it")
implementation("dev.chrisbanes.accompanist:accompanist-insets:$it") implementation("dev.chrisbanes.accompanist:accompanist-insets:$it")
} }*/
} }
} }
} }

View File

@ -22,6 +22,7 @@ import com.shabinder.common.ui.SpotiFlyerTypography
import com.shabinder.common.ui.colorAccent import com.shabinder.common.ui.colorAccent
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.channelFlow
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
@Composable @Composable
@ -68,7 +69,7 @@ fun TrackCard(
Row(verticalAlignment = Alignment.CenterVertically,modifier = Modifier.fillMaxWidth().padding(horizontal = 8.dp)) { Row(verticalAlignment = Alignment.CenterVertically,modifier = Modifier.fillMaxWidth().padding(horizontal = 8.dp)) {
var pic by mutableStateOf<ImageBitmap?>(null) var pic by mutableStateOf<ImageBitmap?>(null)
val scope = rememberCoroutineScope() val scope = rememberCoroutineScope()
scope.launch(Dispatchers.Unconfined) { LaunchedEffect((1..10).random()){
pic = loadImage(track.albumArtURL) pic = loadImage(track.albumArtURL)
} }
ImageLoad( ImageLoad(
@ -128,8 +129,10 @@ fun CoverImage(
horizontalAlignment = Alignment.CenterHorizontally horizontalAlignment = Alignment.CenterHorizontally
) { ) {
var pic by mutableStateOf<ImageBitmap?>(null) var pic by mutableStateOf<ImageBitmap?>(null)
scope.launch(Dispatchers.Unconfined) { LaunchedEffect(true){
pic = loadImage(coverURL) scope.launch(dispatcherIO) {
pic = loadImage(coverURL)
}
} }
ImageLoad( ImageLoad(
pic, pic,

View File

@ -328,7 +328,7 @@ fun DownloadRecordItem(
Row(verticalAlignment = Alignment.CenterVertically,modifier = Modifier.fillMaxWidth().padding(end = 8.dp)) { Row(verticalAlignment = Alignment.CenterVertically,modifier = Modifier.fillMaxWidth().padding(end = 8.dp)) {
val scope = rememberCoroutineScope() val scope = rememberCoroutineScope()
var pic by mutableStateOf<ImageBitmap?>(null) var pic by mutableStateOf<ImageBitmap?>(null)
scope.launch(Dispatchers.Unconfined) { scope.launch(dispatcherIO) {
pic = loadImage(item.coverUrl) pic = loadImage(item.coverUrl)
} }
ImageLoad( ImageLoad(

View File

@ -43,7 +43,8 @@ actual fun PlaceHolderImage():ImageVector = vectorXmlResource("drawable/music
@Composable @Composable
actual fun SpotiFlyerLogo():ImageVector = vectorXmlResource("drawable/ic_spotiflyer_logo.xml") actual fun SpotiFlyerLogo():ImageVector =
vectorXmlResource("drawable/ic_spotiflyer_logo.xml")
@Composable @Composable
actual fun HeartIcon():ImageVector = vectorXmlResource("drawable/ic_heart.xml") actual fun HeartIcon():ImageVector = vectorXmlResource("drawable/ic_heart.xml")