Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip - try and fix the barcode scanner crash #201

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions gen-random-data.py

This file was deleted.

6 changes: 3 additions & 3 deletions native/app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const config = () => ({
expo: {
name: "InvTrack",
slug: "invtrack",
version: "1.5.0",
version: "1.6.1",
orientation: "portrait",
owner: "invtrack",
icon: "./assets/images/icon.png",
Expand All @@ -18,7 +18,7 @@ const config = () => ({
},
assetBundlePatterns: ["**/*"],
ios: {
buildNumber: "1.5.0",
buildNumber: "1.6.1",
supportsTablet: false,
bundleIdentifier: "app.invtrack.invtrack",
},
Expand All @@ -28,7 +28,7 @@ const config = () => ({
backgroundColor: "#212939",
},
package: "app.invtrack.invtrack",
versionCode: 10500,
versionCode: 10601,
},
plugins: [
[
Expand Down
35 changes: 18 additions & 17 deletions native/db/hooks/useCheckIfNativeUpdateNeeded.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
import { useQuery } from "@tanstack/react-query";
import * as Application from "expo-application";
import { EnvConfig } from "../../config/env";
import { supabase } from "../supabase";
// import * as Application from "expo-application";
// import { EnvConfig } from "../../config/env";
// import { supabase } from "../supabase";

const checkIfNativeUpdateNeeded = async (): Promise<boolean> => {
if (EnvConfig.isDevEnv) {
return false;
}
return false;
// if (EnvConfig.isDevEnv) {
// return false;
// }

const res = await supabase.functions.invoke("utilities", {
body: JSON.stringify({ function: "getAppVersion" }),
});
// const res = await supabase.functions.invoke("utilities", {
// body: JSON.stringify({ function: "getAppVersion" }),
// });

if (res.error) {
console.error(res.error);
return false;
}
// if (res.error) {
// console.error(res.error);
// return false;
// }

return (
!Application?.nativeApplicationVersion?.startsWith(res.data as string) ||
false
);
// return (
// !Application?.nativeApplicationVersion?.startsWith(res.data as string) ||
// false
// );
};

export const useCheckIfNativeUpdateNeeded = () =>
Expand Down
Loading
Loading