Skip to content

Commit

Permalink
fix: send appReady if auto update disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed Aug 17, 2023
1 parent 4f34371 commit d56d86f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class CapacitorUpdaterPlugin
private static final String channelUrlDefault =
"https://api.capgo.app/channel_self";

private final String PLUGIN_VERSION = "5.2.5";
private final String PLUGIN_VERSION = "5.2.6";
private static final String DELAY_CONDITION_PREFERENCES = "";

private SharedPreferences.Editor editor;
Expand Down Expand Up @@ -1235,6 +1235,11 @@ public void appMovedToForeground() {
this._checkCancelDelay(true);
if (CapacitorUpdaterPlugin.this._isAutoUpdateEnabled()) {
this.backgroundDownload();
} else {
Log.i(CapacitorUpdater.TAG, "Auto update is disabled");
final JSObject ret = new JSObject();
ret.put("bundle", current.toJSON());
CapacitorUpdaterPlugin.this.notifyListeners("appReady", ret);
}
this.checkAppReady();
}
Expand Down
1 change: 1 addition & 0 deletions ios/Plugin/CapacitorUpdaterPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
self.backgroundDownload()
} else {
print("\(self.implementation.TAG) Auto update is disabled")
self.notifyListeners("appReady", data: ["bundle": current.toJSON()])
}
self.checkAppReady()
}
Expand Down

0 comments on commit d56d86f

Please sign in to comment.