1.3.6-5 Resolve uploads for cloudinary.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import * as MediaLibrary from "expo-media-library";
|
||||
import { DateTime } from "luxon";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import {
|
||||
@@ -50,8 +49,6 @@ export function UploadProgress({
|
||||
speed: 0,
|
||||
});
|
||||
|
||||
let filesToDelete = [];
|
||||
|
||||
const { t } = useTranslation();
|
||||
|
||||
useEffect(() => {
|
||||
@@ -118,22 +115,12 @@ export function UploadProgress({
|
||||
|
||||
if (deleteAfterUpload) {
|
||||
try {
|
||||
const a = await MediaLibrary.getAssetsAsync();
|
||||
|
||||
const res = await Promise.all(
|
||||
filesToDelete.map((f) => {
|
||||
return MediaLibrary.removeAssetsFromAlbumAsync(f, f.albumId);
|
||||
})
|
||||
);
|
||||
|
||||
const deleteResult = await MediaLibrary.deleteAssetsAsync(
|
||||
filesToDelete.map((f) => f.id)
|
||||
);
|
||||
await MediaLibrary.deleteAssetsAsync(data);
|
||||
} catch (error) {
|
||||
console.log("Unable to delete picture.", error);
|
||||
}
|
||||
}
|
||||
filesToDelete = [];
|
||||
|
||||
setProgress({
|
||||
loading: false,
|
||||
speed: 0,
|
||||
@@ -143,7 +130,6 @@ export function UploadProgress({
|
||||
forceRerender();
|
||||
};
|
||||
|
||||
console.log(progress);
|
||||
return (
|
||||
<Modal
|
||||
visible={progress.uploadInProgress}
|
||||
@@ -180,7 +166,7 @@ export function UploadProgress({
|
||||
)}/sec`}</Text>
|
||||
<Text
|
||||
style={{ alignSelf: "center", marginTop: 16 }}
|
||||
>{`Total Uploaded ${formatBytes(progress.loaded)}/sec`}</Text>
|
||||
>{`Total Uploaded ${formatBytes(progress.loaded)}`}</Text>
|
||||
<Text style={{ alignSelf: "center", marginTop: 16 }}>{`Duration ${(
|
||||
(new Date() - progress.start) /
|
||||
1000
|
||||
|
||||
@@ -5,7 +5,7 @@ import { createStackNavigator } from "@react-navigation/stack";
|
||||
import i18n from "i18next";
|
||||
import React, { useEffect } from "react";
|
||||
import { Button } from "react-native-paper";
|
||||
import { SafeAreaView } from "react-native";
|
||||
import { SafeAreaView } from "react-native-safe-area-context";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { logImEXEvent } from "../../firebase/firebase.analytics";
|
||||
|
||||
@@ -27,7 +27,7 @@ export default function ScreenSettingsComponent() {
|
||||
|
||||
<Text>Release Channel {Updates.releaseChannel}</Text>
|
||||
<SignOutButton />
|
||||
<Button title="Purge State" onPress={() => purgeStoredState()} />
|
||||
{/* <Button title="Purge State" onPress={() => purgeStoredState()} /> */}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ export function SignOutButton({ signOutStart }) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Button
|
||||
style={{ margin: 8 }}
|
||||
onPress={() => signOutStart()}
|
||||
title={t("general.actions.signout")}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user