Bug Fixes and Version Bump

This commit is contained in:
shabinder 2021-01-02 19:35:31 +05:30
parent e056344d28
commit da9ab5df64
3 changed files with 14 additions and 12 deletions

View File

@ -22,8 +22,8 @@ android {
applicationId "com.shabinder.spotiflyer"
minSdkVersion 22
targetSdkVersion 30
versionCode 1
versionName "1.0"
versionCode 12
versionName "2.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -113,7 +113,7 @@ class MainActivity : AppCompatActivity(), PaymentResultListener {
private fun checkIfLatestVersion() {
AppUpdater(this,0).run {
setDisplay(Display.NOTIFICATION)
showAppUpdated(true)//true:Show App is Updated Dialog
showAppUpdated(false)//true:Show App is Updated Dialog
setUpdateFrom(UpdateFrom.XML)
setUpdateXML("https://raw.githubusercontent.com/Shabinder/SpotiFlyer/master/app/src/main/res/xml/app_update.xml")
setCancelable(false)
@ -280,15 +280,15 @@ fun AppBar(
)
}
},
actions = {
/*actions = {
Providers(AmbientContentAlpha provides ContentAlpha.medium) {
IconButton(
onClick = { /* TODO: Open Preferences*/ }
onClick = { *//* TODO: Open Preferences*//* }
) {
Icon(Icons.Filled.Settings, tint = Color.Gray)
}
}
},
},*/
modifier = modifier,
elevation = 0.dp
)

View File

@ -38,10 +38,7 @@ import com.shabinder.spotiflyer.navigation.navigateToTrackList
import com.shabinder.spotiflyer.ui.SpotiFlyerTypography
import com.shabinder.spotiflyer.ui.colorAccent
import com.shabinder.spotiflyer.ui.colorPrimary
import com.shabinder.spotiflyer.utils.mainActivity
import com.shabinder.spotiflyer.utils.openPlatform
import com.shabinder.spotiflyer.utils.sharedViewModel
import com.shabinder.spotiflyer.utils.showDialog
import com.shabinder.spotiflyer.utils.*
import dev.chrisbanes.accompanist.coil.CoilImage
import org.json.JSONObject
@ -273,7 +270,8 @@ fun DownloadRecordItem(item: DownloadRecord,navController: NavController) {
Image(
imageVector = vectorResource(id = R.drawable.ic_share_open),
modifier = Modifier.clickable(onClick = {
navController.navigateToTrackList(item.link)
if(!isOnline()) showDialog("Check Your Internet Connection")
else navController.navigateToTrackList(item.link)
})
)
}
@ -395,7 +393,11 @@ fun SearchPanel(
OutlinedButton(
modifier = Modifier.padding(12.dp).wrapContentWidth(),
onClick = {
navController.navigateToTrackList(link)
if(link.isBlank()) showDialog("Enter A Link!")
else{
if(!isOnline()) showDialog("Check Your Internet Connection")
else navController.navigateToTrackList(link)
}
},
border = BorderStroke(1.dp, Brush.horizontalGradient(listOf(colorPrimary, colorAccent)))
){