1.3.6-1 Release - Toast for successful push.

This commit is contained in:
Patrick Fic
2022-05-17 18:18:39 -07:00
parent 1af1f6a679
commit 9c101e8bd4
3 changed files with 17 additions and 3 deletions

View File

@@ -65,7 +65,14 @@ export function UploadProgress({
//if (!uploads) return null;
function handleOnSuccess(id, asset) {
function handleOnSuccess(id, asset, { duration }) {
//If it's not in production, show a toast with the time.
Toast.show({
type: "success",
text1: `${duration} - Upload completed for ${asset.filename}.`,
text2: duration,
});
logImEXEvent("imexmobile_successful_upload");
filesToDelete.push(asset);
setProgress((progress) => ({
@@ -199,7 +206,7 @@ export function UploadProgress({
onError: (error) => handleOnError(p.id, error),
onProgress: ({ percent, loaded }) =>
handleOnProgress(p.id, percent, loaded),
onSuccess: () => handleOnSuccess(p.id, p),
onSuccess: ({ duration }) => handleOnSuccess(p.id, p, { duration }),
file: p,
},
context: {