Show update button in Explore menu when installed version is not the latest
This commit is contained in:
@@ -260,6 +260,16 @@ fun Explore() {
|
|||||||
sourceInfo.version
|
sourceInfo.version
|
||||||
) {
|
) {
|
||||||
DownloadApkAction(actionState) {
|
DownloadApkAction(actionState) {
|
||||||
|
if (localSources[sourceInfo.name]?.version != sourceInfo.version) {
|
||||||
|
TextButton(onClick = {
|
||||||
|
coroutineScope.launch {
|
||||||
|
val file = actionState.download(sourceInfo)
|
||||||
|
context.launchApkInstaller(file)
|
||||||
|
}
|
||||||
|
}) {
|
||||||
|
Text("UPDATE")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
IconButton(onClick = {
|
IconButton(onClick = {
|
||||||
if (sourceInfo.name in localSources) {
|
if (sourceInfo.name in localSources) {
|
||||||
context.startActivity(
|
context.startActivity(
|
||||||
@@ -285,6 +295,7 @@ fun Explore() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun SourceSelector(onSource: (SourceEntry) -> Unit) {
|
fun SourceSelector(onSource: (SourceEntry) -> Unit) {
|
||||||
|
|||||||
Reference in New Issue
Block a user