Skip to content

Commit

Permalink
Merge branch 'gedoor:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
mgz0227 authored Dec 14, 2024
2 parents fb59b5c + 34f706e commit 356a1ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
13 changes: 7 additions & 6 deletions app/src/main/java/io/legado/app/service/WebTileService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

Expand Down

0 comments on commit 356a1ea

Please sign in to comment.