fix:github release check

This commit is contained in:
eddyizm 2025-11-11 12:00:05 -08:00
parent 0be309fb22
commit 2c6287405e
No known key found for this signature in database
GPG key ID: CF5F671829E8158A
2 changed files with 3 additions and 2 deletions

View file

@ -11,7 +11,7 @@ android {
targetSdk 35 targetSdk 35
versionCode 5 versionCode 5
versionName '4.2.0' versionName '4.2.1'
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
javaCompileOptions { javaCompileOptions {

View file

@ -7,10 +7,11 @@ public class UpdateUtil {
public static boolean showUpdateDialog(LatestRelease release) { public static boolean showUpdateDialog(LatestRelease release) {
if (release.getTagName() == null) return false; if (release.getTagName() == null) return false;
String remoteTag = release.getTagName().replaceAll("^\\D+", "");
try { try {
String[] local = BuildConfig.VERSION_NAME.split("\\."); String[] local = BuildConfig.VERSION_NAME.split("\\.");
String[] remote = release.getTagName().split("\\."); String[] remote = remoteTag.split("\\.");
for (int i = 0; i < local.length; i++) { for (int i = 0; i < local.length; i++) {
int localPart = Integer.parseInt(local[i]); int localPart = Integer.parseInt(local[i]);