Skip to content

Commit

Permalink
fix: build android
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed Nov 15, 2022
1 parent 2ff68b0 commit 7f030b4
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ public void notifyDownload(final String id, final int percent) {
try {
final JSObject ret = new JSObject();
ret.put("percent", percent);
JSObject bundle = this.implementation.getBundleInfo(id);
ret.put("bundle", bundle.toJSON());
final BundleInfo bundleInfo = = this.implementation.getBundleInfo(id);
ret.put("bundle", bundleInfo.toJSON());
this.notifyListeners("download", ret);
if (percent == 100) {
this.notifyListeners("downloadComplete", bundle.toJSON());
this.implementation.sendStats("download_complete", bundle.getVersionName());
this.notifyListeners("downloadComplete", bundleInfo.toJSON());
this.implementation.sendStats("download_complete", bundleInfo.getVersionName());
} else if (percent % 10 == 0) {
this.implementation.sendStats("download_" + percent, bundle.getVersionName());
this.implementation.sendStats("download_" + percent, bundleInfo.getVersionName());
}
} catch (final Exception e) {
Log.e(CapacitorUpdater.TAG, "Could not notify listeners", e);
Expand Down

0 comments on commit 7f030b4

Please sign in to comment.