From 291e0c41afc47a7c4b9af6d98015a36b65c671a1 Mon Sep 17 00:00:00 2001 From: Jens Date: Sun, 2 Jul 2023 00:31:09 +0200 Subject: [PATCH] Fixed bug --- app/src/main/java/com/jens/automation2/ActivityMainScreen.java | 2 +- app/src/main/java/com/jens/automation2/Miscellaneous.java | 2 +- fastlane/metadata/android/en-US/changelogs/133.txt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/133.txt diff --git a/app/src/main/java/com/jens/automation2/ActivityMainScreen.java b/app/src/main/java/com/jens/automation2/ActivityMainScreen.java index 4b3cef9..8714405 100644 --- a/app/src/main/java/com/jens/automation2/ActivityMainScreen.java +++ b/app/src/main/java/com/jens/automation2/ActivityMainScreen.java @@ -434,7 +434,7 @@ public class ActivityMainScreen extends ActivityGeneric else activityMainScreenInstance.checkForNews(); - if(BuildConfig.FLAVOR.equals("apkFlavor") && Settings.automaticUpdateCheck) + if(BuildConfig.FLAVOR.equals(AutomationService.flavor_name_apk) && Settings.automaticUpdateCheck) { Calendar now = Calendar.getInstance(); if (Settings.lastUpdateCheck == Settings.default_lastUpdateCheck || now.getTimeInMillis() >= Settings.lastUpdateCheck + (long)(Settings.updateCheckFrequencyDays * 24 * 60 * 60 * 1000)) diff --git a/app/src/main/java/com/jens/automation2/Miscellaneous.java b/app/src/main/java/com/jens/automation2/Miscellaneous.java index 82954cd..91d7378 100644 --- a/app/src/main/java/com/jens/automation2/Miscellaneous.java +++ b/app/src/main/java/com/jens/automation2/Miscellaneous.java @@ -760,7 +760,7 @@ public class Miscellaneous extends Service else replacement = "unknownVariable"; - source = source.substring(0, pos1) + replacement + source.substring(pos2); + source = source.substring(0, pos1) + replacement + source.substring(pos2 +1); } // Miscellaneous.logEvent("i", "URL after replace", source); diff --git a/fastlane/metadata/android/en-US/changelogs/133.txt b/fastlane/metadata/android/en-US/changelogs/133.txt new file mode 100644 index 0000000..6f085bb --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/133.txt @@ -0,0 +1 @@ +* Fixed: [variable-name] was incorrectly replaced with an ] at the end \ No newline at end of file