Skip to content

Commit

Permalink
Fixed app crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
BobbyESP committed Dec 3, 2022
1 parent ac559f9 commit 8d56cd2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 20 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ apply(plugin = "dagger.hilt.android.plugin")

val versionMajor = 0
val versionMinor = 1
val versionPatch = 0
val versionPatch = 1
val versionBuild = 0
val isStable = true

Expand Down Expand Up @@ -87,7 +87,7 @@ android {
buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
isShrinkResources = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
Expand Down Expand Up @@ -127,7 +127,7 @@ android {
applicationVariants.all {
outputs.all {
(this as com.android.build.gradle.internal.api.BaseVariantOutputImpl).outputFileName =
"Spowlo-${defaultConfig.versionName}-${name}.apk"
"Jetispot-${defaultConfig.versionName}-${name}.apk"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,38 @@ fun TwoColumnAndImageBlock(
text: String,
modifier: Modifier = Modifier
) {

Row(
modifier
.fillMaxWidth()
.padding(horizontal = 16.dp, vertical = 12.dp)) {
PreviewableAsyncImage(
imageUrl = remember(artworkUri) {
artworkUri?.let {
"https://i.scdn.co/image/" + ImageId.fromUri(
if (artworkUri.startsWith(
"spotify:mosaic"
)
) "spotify:image:ab67706c0000bebb8d0ce13d55f634e290f744ba" else it
).hexId()
}
}, placeholderType = "track", modifier = Modifier
.size(48.dp)
)
.padding(horizontal = 16.dp, vertical = 12.dp)
) {
if (artworkUri!!.startsWith("spotify:image")) {
val imageId = remember { artworkUri }
PreviewableAsyncImage(
imageUrl = remember(artworkUri) {
artworkUri.let {
"https://i.scdn.co/image/" + ImageId.fromUri(
imageId
).hexId()
}
}, placeholderType = "track", modifier = Modifier
.size(48.dp)
)
} else {
PreviewableAsyncImage(
imageUrl = artworkUri,
modifier = Modifier
.size(48.dp),
placeholderType = "track"
)
}

Column(
Modifier
.padding(horizontal = 12.dp)
.align(Alignment.CenterVertically)) {
.align(Alignment.CenterVertically)
) {
MediumText(title, fontWeight = FontWeight.Normal, fontSize = 18.sp)
Spacer(Modifier.height(4.dp))
Subtext(text, modifier = Modifier, maxLines = 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fun HubScreen(

LaunchedEffect(Unit) {
viewModel.load(onAppBarTitleChange, loader)
launch(Dispatchers.IO) {
/*launch(Dispatchers.IO) {
kotlin.runCatching {
val temp = UpdateUtil.checkForUpdate()
if (temp != null) {
Expand All @@ -59,7 +59,7 @@ fun HubScreen(
}.onFailure {
it.printStackTrace()
}
}
}*/
}

if(showUpdateDialog) {
Expand Down

0 comments on commit 8d56cd2

Please sign in to comment.