This commit is contained in:
Horis
2024-12-14 20:31:12 +08:00
parent f2b7635f72
commit 2fe26909af
2 changed files with 8 additions and 7 deletions
@@ -13,7 +13,7 @@ data class AppReleaseInfo(
val downloadUrl: String, val downloadUrl: String,
val assetUrl: 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 { enum class AppVariant {
@@ -40,12 +40,13 @@ class WebTileService : TileService() {
override fun onStartListening() { override fun onStartListening() {
super.onStartListening() super.onStartListening()
if (WebService.isRun) { qsTile?.run {
qsTile.state = Tile.STATE_ACTIVE state = if (WebService.isRun) {
qsTile.updateTile() Tile.STATE_ACTIVE
} else { } else {
qsTile.state = Tile.STATE_INACTIVE Tile.STATE_INACTIVE
qsTile.updateTile() }
updateTile()
} }
} }