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)
//Coil-Image Loading
Versions.coilVersion.let{
/*Versions.coilVersion.let{
implementation("dev.chrisbanes.accompanist:accompanist-coil:$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 kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.channelFlow
import kotlinx.coroutines.launch
@Composable
@ -68,7 +69,7 @@ fun TrackCard(
Row(verticalAlignment = Alignment.CenterVertically,modifier = Modifier.fillMaxWidth().padding(horizontal = 8.dp)) {
var pic by mutableStateOf<ImageBitmap?>(null)
val scope = rememberCoroutineScope()
scope.launch(Dispatchers.Unconfined) {
LaunchedEffect((1..10).random()){
pic = loadImage(track.albumArtURL)
}
ImageLoad(
@ -128,9 +129,11 @@ fun CoverImage(
horizontalAlignment = Alignment.CenterHorizontally
) {
var pic by mutableStateOf<ImageBitmap?>(null)
scope.launch(Dispatchers.Unconfined) {
LaunchedEffect(true){
scope.launch(dispatcherIO) {
pic = loadImage(coverURL)
}
}
ImageLoad(
pic,
"Cover Image",

View File

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

View File

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