Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed Jul 14, 2023
1 parent 080468a commit ee9e6e8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -641,10 +641,10 @@ private boolean bundleExists(final String id) {
bundle.exists() &&
new File(bundle.getPath(), "/index.html").exists() &&
!bundleInfo.isDeleted()
) {
return true;
}
return false;
) {
return true;
}
return false;
}

public Boolean set(final BundleInfo bundle) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,10 @@ public void notifyDownload(final String id, final int percent) {
ret.put("bundle", bundleInfo.toJSON());
this.notifyListeners("download", ret);
if (percent == 100) {
final JSObject retDownloadComplete = new JSObject(ret, new String[] {"bundle"});
final JSObject retDownloadComplete = new JSObject(
ret,
new String[] { "bundle" }
);
this.notifyListeners("downloadComplete", retDownloadComplete);
this.implementation.sendStats(
"download_complete",
Expand Down
17 changes: 8 additions & 9 deletions ios/Plugin/CapacitorUpdater.swift
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ extension CustomError: LocalizedError {
let percent = self.calcTotalPercent(percent: Int(progress.fractionCompleted * 100), min: 10, max: 70)
self.notifyDownload(id, percent)
}
request.responseURL (queue: .global(qos: .background) , completionHandler: { (response) in
request.responseURL(queue: .global(qos: .background), completionHandler: { (response) in
if let fileURL = response.fileURL {
switch response.result {
case .success:
Expand Down Expand Up @@ -577,15 +577,14 @@ extension CustomError: LocalizedError {
let indexHot: URL = destHot.appendingPathComponent("index.html")
let indexPersist: URL = destHotPersist.appendingPathComponent("index.html")
let bundleIndo: BundleInfo = self.getBundleInfo(id: id)
if (
if
destHot.exist &&
destHot.isDirectory &&
destHotPersist.exist &&
destHotPersist.isDirectory &&
indexHot.exist &&
indexPersist.exist &&
!bundleIndo.isDeleted()
) {
destHot.isDirectory &&
destHotPersist.exist &&
destHotPersist.isDirectory &&
indexHot.exist &&
indexPersist.exist &&
!bundleIndo.isDeleted() {
return true
}
return false
Expand Down

0 comments on commit ee9e6e8

Please sign in to comment.