This commit is contained in:
Horis 2024-12-14 20:31:12 +08:00
parent 90e870e1a9
commit 34f706ecda
2 changed files with 8 additions and 7 deletions

View File

@ -13,7 +13,7 @@ data class AppReleaseInfo(
val downloadUrl: String,
val assetUrl: String
) {
val versionName: String = name.split("_").getOrNull(2)?.removeSuffix(".apk") ?: ""
val versionName: String = name.split("_").getOrNull(2)?.dropLast(2) ?: ""
}
enum class AppVariant {

View File

@ -40,12 +40,13 @@ class WebTileService : TileService() {
override fun onStartListening() {
super.onStartListening()
if (WebService.isRun) {
qsTile.state = Tile.STATE_ACTIVE
qsTile.updateTile()
} else {
qsTile.state = Tile.STATE_INACTIVE
qsTile.updateTile()
qsTile?.run {
state = if (WebService.isRun) {
Tile.STATE_ACTIVE
} else {
Tile.STATE_INACTIVE
}
updateTile()
}
}