Skip to content
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