@capgo/capacitor-updater 5.7.1 → 5.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -55,7 +55,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
|
|
|
55
55
|
private static final String channelUrlDefault =
|
|
56
56
|
"https://api.capgo.app/channel_self";
|
|
57
57
|
|
|
58
|
-
private final String PLUGIN_VERSION = "5.7.
|
|
58
|
+
private final String PLUGIN_VERSION = "5.7.2";
|
|
59
59
|
private static final String DELAY_CONDITION_PREFERENCES = "";
|
|
60
60
|
|
|
61
61
|
private SharedPreferences.Editor editor;
|
|
@@ -822,6 +822,9 @@ public class CapacitorUpdaterPlugin extends Plugin {
|
|
|
822
822
|
if (this.periodCheckDelay == 0 || !this._isAutoUpdateEnabled()) {
|
|
823
823
|
return;
|
|
824
824
|
}
|
|
825
|
+
// The delay should be equal to this.periodCheckDelay.
|
|
826
|
+
// In appMovedToForeground we schedule a backgroundDownload and it happens BEFORE this scheduleAtFixedRate
|
|
827
|
+
// As such we get a race condition
|
|
825
828
|
final Timer timer = new Timer();
|
|
826
829
|
timer.scheduleAtFixedRate(
|
|
827
830
|
new TimerTask() {
|
|
@@ -854,7 +857,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
|
|
|
854
857
|
}
|
|
855
858
|
}
|
|
856
859
|
},
|
|
857
|
-
|
|
860
|
+
this.periodCheckDelay,
|
|
858
861
|
this.periodCheckDelay
|
|
859
862
|
);
|
|
860
863
|
}
|
|
@@ -15,7 +15,7 @@ import Version
|
|
|
15
15
|
@objc(CapacitorUpdaterPlugin)
|
|
16
16
|
public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
17
17
|
public var implementation = CapacitorUpdater()
|
|
18
|
-
private let PLUGIN_VERSION: String = "5.7.
|
|
18
|
+
private let PLUGIN_VERSION: String = "5.7.2"
|
|
19
19
|
static let updateUrlDefault = "https://api.capgo.app/updates"
|
|
20
20
|
static let statsUrlDefault = "https://api.capgo.app/stats"
|
|
21
21
|
static let channelUrlDefault = "https://api.capgo.app/channel_self"
|