mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-28 17:19:00 +03:00
fix updater always showing that there's an...
...update available
This commit is contained in:
parent
78ba56d6d3
commit
aa517952e6
1 changed files with 3 additions and 3 deletions
|
@ -40,15 +40,15 @@ class GithubUpdateChecker {
|
|||
|
||||
private fun isNewVersion(versionTag: String): Boolean {
|
||||
// Removes prefixes like "r" or "v"
|
||||
val newVersion = versionTag.replace("[^\\d.]".toRegex(), "")
|
||||
val newVersion = versionTag.replace("[^\\d.\\-mi]".toRegex(), "")
|
||||
|
||||
return if (BuildConfig.DEBUG) {
|
||||
// Preview builds: based on releases in "jmir1/tachiyomi-preview" repo
|
||||
// tagged as something like "r1234"
|
||||
newVersion.toInt() > BuildConfig.COMMIT_COUNT.toInt()
|
||||
} else {
|
||||
// Release builds: based on releases in "tachiyomiorg/tachiyomi" repo
|
||||
// tagged as something like "v0.1.2"
|
||||
// Release builds: based on releases in "jmir1/tachiyomi-mi" repo
|
||||
// tagged as something like "v0.1.2-mi"
|
||||
newVersion != BuildConfig.VERSION_NAME
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue