mirror of
https://github.com/gedoor/legado.git
synced 2025-01-07 03:06:58 +08:00
优化
This commit is contained in:
parent
90e870e1a9
commit
34f706ecda
@ -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 {
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user