mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-29 01:29:02 +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 {
|
private fun isNewVersion(versionTag: String): Boolean {
|
||||||
// Removes prefixes like "r" or "v"
|
// Removes prefixes like "r" or "v"
|
||||||
val newVersion = versionTag.replace("[^\\d.]".toRegex(), "")
|
val newVersion = versionTag.replace("[^\\d.\\-mi]".toRegex(), "")
|
||||||
|
|
||||||
return if (BuildConfig.DEBUG) {
|
return if (BuildConfig.DEBUG) {
|
||||||
// Preview builds: based on releases in "jmir1/tachiyomi-preview" repo
|
// Preview builds: based on releases in "jmir1/tachiyomi-preview" repo
|
||||||
// tagged as something like "r1234"
|
// tagged as something like "r1234"
|
||||||
newVersion.toInt() > BuildConfig.COMMIT_COUNT.toInt()
|
newVersion.toInt() > BuildConfig.COMMIT_COUNT.toInt()
|
||||||
} else {
|
} else {
|
||||||
// Release builds: based on releases in "tachiyomiorg/tachiyomi" repo
|
// Release builds: based on releases in "jmir1/tachiyomi-mi" repo
|
||||||
// tagged as something like "v0.1.2"
|
// tagged as something like "v0.1.2-mi"
|
||||||
newVersion != BuildConfig.VERSION_NAME
|
newVersion != BuildConfig.VERSION_NAME
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue