Skip to content

Commit

Permalink
lint(storage, android): de-lint android storage module
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehardy committed May 18, 2021
1 parent 59e0669 commit 76455b1
Showing 1 changed file with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void onCatalystInstanceDestroy() {
}

/**
* @url https://firebase.google.com/docs/reference/js/firebase.storage.Reference#delete
* @link https://firebase.google.com/docs/reference/js/firebase.storage.Reference#delete
*/
@ReactMethod
public void delete(String appName, String url, final Promise promise) {
Expand All @@ -76,7 +76,7 @@ public void delete(String appName, String url, final Promise promise) {
}

/**
* @url https://firebase.google.com/docs/reference/js/firebase.storage.Reference#getDownloadURL
* @link https://firebase.google.com/docs/reference/js/firebase.storage.Reference#getDownloadURL
*/
@ReactMethod
public void getDownloadURL(String appName, final String url, final Promise promise) {
Expand All @@ -97,7 +97,7 @@ public void getDownloadURL(String appName, final String url, final Promise promi
}

/**
* @url https://firebase.google.com/docs/reference/js/firebase.storage.Reference#getMetadata
* @link https://firebase.google.com/docs/reference/js/firebase.storage.Reference#getMetadata
*/
@ReactMethod
public void getMetadata(String appName, String url, Promise promise) {
Expand All @@ -115,6 +115,9 @@ public void getMetadata(String appName, String url, Promise promise) {
}
}

/**
* @link https://firebase.google.com/docs/reference/js/firebase.storage.Reference#list
*/
@ReactMethod
public void list(String appName, String url, ReadableMap listOptions, Promise promise) {
try {
Expand All @@ -132,7 +135,7 @@ public void list(String appName, String url, ReadableMap listOptions, Promise pr

list.addOnCompleteListener(getExecutor(), task -> {
if (task.isSuccessful()) {
promise.resolve(getListResultAsMap(task.getResult()));
promise.resolve(getListResultAsMap(Objects.requireNonNull(task.getResult())));
} else {
promiseRejectStorageException(promise, task.getException());
}
Expand All @@ -142,13 +145,16 @@ public void list(String appName, String url, ReadableMap listOptions, Promise pr
}
}

/**
* @link https://firebase.google.com/docs/reference/js/firebase.storage.Reference#listAll
*/
@ReactMethod
public void listAll(String appName, String url, Promise promise) {
try {
StorageReference reference = getReferenceFromUrl(url, appName);
reference.listAll().addOnCompleteListener(getExecutor(), task -> {
if (task.isSuccessful()) {
promise.resolve(getListResultAsMap(task.getResult()));
promise.resolve(getListResultAsMap(Objects.requireNonNull(task.getResult())));
} else {
promiseRejectStorageException(promise, task.getException());
}
Expand All @@ -159,7 +165,7 @@ public void listAll(String appName, String url, Promise promise) {
}

/**
* @url https://firebase.google.com/docs/reference/js/firebase.storage.Reference#updateMetadata
* @link https://firebase.google.com/docs/reference/js/firebase.storage.Reference#updateMetadata
*/
@ReactMethod
public void updateMetadata(
Expand All @@ -185,7 +191,7 @@ public void updateMetadata(
}

/**
* @url https://firebase.google.com/docs/reference/js/firebase.storage.Storage#setMaxDownloadRetryTime
* @link https://firebase.google.com/docs/reference/js/firebase.storage.Storage#setMaxDownloadRetryTime
*/
@ReactMethod
public void setMaxDownloadRetryTime(String appName, double milliseconds, Promise promise) {
Expand All @@ -196,7 +202,7 @@ public void setMaxDownloadRetryTime(String appName, double milliseconds, Promise
}

/**
* @url https://firebase.google.com/docs/reference/js/firebase.storage.Storage#setMaxOperationRetryTime
* @link https://firebase.google.com/docs/reference/js/firebase.storage.Storage#setMaxOperationRetryTime
*/
@ReactMethod
public void setMaxOperationRetryTime(String appName, double milliseconds, Promise promise) {
Expand All @@ -207,7 +213,7 @@ public void setMaxOperationRetryTime(String appName, double milliseconds, Promis
}

/**
* @url https://firebase.google.com/docs/reference/js/firebase.storage.Storage#setMaxUploadRetryTime
* @link https://firebase.google.com/docs/reference/js/firebase.storage.Storage#setMaxUploadRetryTime
*/
@ReactMethod
public void setMaxUploadRetryTime(String appName, double milliseconds, Promise promise) {
Expand All @@ -218,7 +224,7 @@ public void setMaxUploadRetryTime(String appName, double milliseconds, Promise p
}

/**
* @url https://firebase.google.com/docs/reference/js/firebase.storage.Reference#writeToFile
* @link https://firebase.google.com/docs/reference/js/firebase.storage.Reference#writeToFile
*/
@ReactMethod
public void writeToFile(
Expand Down Expand Up @@ -253,7 +259,7 @@ public void writeToFile(
}

/**
* @url https://firebase.google.com/docs/reference/js/firebase.storage.Reference#putString
* @link https://firebase.google.com/docs/reference/js/firebase.storage.Reference#putString
*/
@ReactMethod
public void putString(
Expand All @@ -280,7 +286,7 @@ public void putString(
}

/**
* @url https://firebase.google.com/docs/reference/js/firebase.storage.Reference#putFile
* @link https://firebase.google.com/docs/reference/js/firebase.storage.Reference#putFile
*/
@ReactMethod
public void putFile(
Expand Down

0 comments on commit 76455b1

Please sign in to comment.