Resolve android compatibility issues.
This commit is contained in:
2
App.js
2
App.js
@@ -9,6 +9,8 @@ import { logImEXEvent } from "./firebase/firebase.analytics";
|
|||||||
import { client } from "./graphql/client";
|
import { client } from "./graphql/client";
|
||||||
import { persistor, store } from "./redux/store";
|
import { persistor, store } from "./redux/store";
|
||||||
import "./translations/i18n";
|
import "./translations/i18n";
|
||||||
|
import "intl";
|
||||||
|
import "intl/locale-data/jsonp/en";
|
||||||
|
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
dsn: "https://8d6c3de1940a4e4f8b81cf4d2150bdea@o492140.ingest.sentry.io/5558869",
|
dsn: "https://8d6c3de1940a4e4f8b81cf4d2150bdea@o492140.ingest.sentry.io/5558869",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { FlatList, RefreshControl, Text } from "react-native";
|
import { FlatList, RefreshControl, Text } from "react-native";
|
||||||
import { Card } from "react-native-paper";
|
import { Card } from "react-native-paper";
|
||||||
import JobNotesItem from "../job-notes-item/job-notes-item.component";
|
import JobNotesItem from "../job-notes-item/job-notes-item.component";
|
||||||
|
|
||||||
export default function JobNotes({ job, loading, refetch }) {
|
export default function JobNotes({ job, loading, refetch }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
if (!job) {
|
if (!job) {
|
||||||
|
|||||||
@@ -173,11 +173,6 @@ export function ScreenMainComponent({
|
|||||||
(bodyshop.features.allAccess === true ||
|
(bodyshop.features.allAccess === true ||
|
||||||
moment(bodyshop.features.mobile).isAfter(moment()));
|
moment(bodyshop.features.mobile).isAfter(moment()));
|
||||||
|
|
||||||
console.log(
|
|
||||||
"🚀 ~ file: screen-main.component.jsx ~ line 171 ~ hasMobileAccess",
|
|
||||||
hasMobileAccess,
|
|
||||||
bodyshop && bodyshop.features
|
|
||||||
);
|
|
||||||
return (
|
return (
|
||||||
<SafeAreaView style={{ flex: 1 }}>
|
<SafeAreaView style={{ flex: 1 }}>
|
||||||
<NavigationContainer>
|
<NavigationContainer>
|
||||||
@@ -187,7 +182,7 @@ export function ScreenMainComponent({
|
|||||||
bodyshop && hasMobileAccess ? (
|
bodyshop && hasMobileAccess ? (
|
||||||
<BottomTabsNavigator />
|
<BottomTabsNavigator />
|
||||||
) : (
|
) : (
|
||||||
<ScreenSplash noAccess />
|
<ScreenSplash noAccess={bodyshop} />
|
||||||
)
|
)
|
||||||
) : (
|
) : (
|
||||||
<ScreenSignIn />
|
<ScreenSignIn />
|
||||||
|
|||||||
@@ -65,9 +65,9 @@ export function UploadProgress({
|
|||||||
|
|
||||||
//if (!uploads) return null;
|
//if (!uploads) return null;
|
||||||
|
|
||||||
function handleOnSuccess(id) {
|
function handleOnSuccess(id, asset) {
|
||||||
logImEXEvent("imexmobile_successful_upload");
|
logImEXEvent("imexmobile_successful_upload");
|
||||||
filesToDelete.push(id);
|
filesToDelete.push(asset);
|
||||||
setProgress((progress) => ({
|
setProgress((progress) => ({
|
||||||
...progress,
|
...progress,
|
||||||
action: t("mediabrowser.labels.converting"),
|
action: t("mediabrowser.labels.converting"),
|
||||||
@@ -173,6 +173,10 @@ export function UploadProgress({
|
|||||||
|
|
||||||
if (deleteAfterUpload) {
|
if (deleteAfterUpload) {
|
||||||
try {
|
try {
|
||||||
|
console.log(filesToDelete);
|
||||||
|
filesToDelete.forEach(
|
||||||
|
async (f) => await MediaLibrary.migrateAlbumIfNeededAsync(f.albumId)
|
||||||
|
);
|
||||||
const result = await MediaLibrary.deleteAssetsAsync(filesToDelete);
|
const result = await MediaLibrary.deleteAssetsAsync(filesToDelete);
|
||||||
console.log("Delete Result", result);
|
console.log("Delete Result", result);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -203,7 +207,7 @@ export function UploadProgress({
|
|||||||
onError: handleOnError,
|
onError: handleOnError,
|
||||||
onProgress: ({ percent, loaded }) =>
|
onProgress: ({ percent, loaded }) =>
|
||||||
handleOnProgress(p.id, percent, loaded),
|
handleOnProgress(p.id, percent, loaded),
|
||||||
onSuccess: () => handleOnSuccess(p.id),
|
onSuccess: () => handleOnSuccess(p.id, p),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
bodyshop: bodyshop,
|
bodyshop: bodyshop,
|
||||||
@@ -233,9 +237,6 @@ export function UploadProgress({
|
|||||||
visible={progress.uploadInProgress}
|
visible={progress.uploadInProgress}
|
||||||
animationType="slide"
|
animationType="slide"
|
||||||
transparent={true}
|
transparent={true}
|
||||||
onRequestClose={() => {
|
|
||||||
Alert.alert("Modal has been closed.");
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<View style={styles.modal}>
|
<View style={styles.modal}>
|
||||||
{progress.loading && <ActivityIndicator />}
|
{progress.loading && <ActivityIndicator />}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
"formik": "^2.2.9",
|
"formik": "^2.2.9",
|
||||||
"graphql": "^16.2.0",
|
"graphql": "^16.2.0",
|
||||||
"i18next": "^21.6.4",
|
"i18next": "^21.6.4",
|
||||||
|
"intl": "^1.2.5",
|
||||||
"lodash": "^4.17.20",
|
"lodash": "^4.17.20",
|
||||||
"luxon": "^2.2.0",
|
"luxon": "^2.2.0",
|
||||||
"moment": "^2.29.1",
|
"moment": "^2.29.1",
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ i18n.use(initReactI18next).init({
|
|||||||
lng: "en-US",
|
lng: "en-US",
|
||||||
fallbackLng: "en-US",
|
fallbackLng: "en-US",
|
||||||
resources,
|
resources,
|
||||||
|
compatibilityJSON: "v3",
|
||||||
// have a common namespace used around the full app
|
// have a common namespace used around the full app
|
||||||
// ns: ["common"],
|
// ns: ["common"],
|
||||||
// defaultNS: "common",
|
// defaultNS: "common",
|
||||||
|
|||||||
@@ -4766,6 +4766,11 @@ interpret@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e"
|
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e"
|
||||||
integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==
|
integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==
|
||||||
|
|
||||||
|
intl@^1.2.5:
|
||||||
|
version "1.2.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/intl/-/intl-1.2.5.tgz#82244a2190c4e419f8371f5aa34daa3420e2abde"
|
||||||
|
integrity sha1-giRKIZDE5Bn4Nx9ao02qNCDiq94=
|
||||||
|
|
||||||
invariant@^2.2.4:
|
invariant@^2.2.4:
|
||||||
version "2.2.4"
|
version "2.2.4"
|
||||||
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
|
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
|
||||||
|
|||||||
Reference in New Issue
Block a user