mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-01 19:49:54 +02:00
mobile: do not check for subscriptions in
github release
This commit is contained in:
@@ -55,7 +55,7 @@ import { SvgView } from "../ui/svg";
|
||||
import Heading from "../ui/typography/heading";
|
||||
import Paragraph from "../ui/typography/paragraph";
|
||||
import { Walkthrough } from "../walkthroughs";
|
||||
import { Config } from "react-native-config";
|
||||
import Config from "react-native-config";
|
||||
|
||||
const Launcher = React.memo(
|
||||
function Launcher() {
|
||||
|
||||
@@ -213,7 +213,6 @@ export const useAppEvents = () => {
|
||||
}, []);
|
||||
|
||||
const onSyncComplete = useCallback(async () => {
|
||||
console.log('Sync complete');
|
||||
initAfterSync();
|
||||
setLastSynced(await db.lastSynced());
|
||||
eSendEvent(eCloseProgressDialog, "sync_progress");
|
||||
|
||||
@@ -34,7 +34,7 @@ import {
|
||||
} from "../../utils/constants";
|
||||
import { eOpenPremiumDialog } from "../../utils/events";
|
||||
import { SIZE } from "../../utils/size";
|
||||
import { Config } from "react-native-config";
|
||||
import Config from "react-native-config";
|
||||
export const Subscription = () => {
|
||||
const user = useUserStore((state) => state.user);
|
||||
const monthlyPlan = usePricing("monthly");
|
||||
|
||||
@@ -21,7 +21,7 @@ import Clipboard from "@react-native-clipboard/clipboard";
|
||||
import EventManager from "@notesnook/core/utils/event-manager";
|
||||
import { RefObject } from "react";
|
||||
import ActionSheet from "react-native-actions-sheet";
|
||||
import { Config } from "react-native-config";
|
||||
import Config from "react-native-config";
|
||||
import {
|
||||
eHideToast,
|
||||
eOnNoteEdited,
|
||||
|
||||
@@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
import { CHECK_IDS } from "@notesnook/core/common";
|
||||
import React from "react";
|
||||
import { Platform } from "react-native";
|
||||
import Config from "react-native-config";
|
||||
import * as RNIap from "react-native-iap";
|
||||
import { db } from "../common/database";
|
||||
import { MMKV } from "../common/database/mmkv";
|
||||
@@ -35,10 +36,8 @@ import {
|
||||
eShowGetPremium
|
||||
} from "../utils/events";
|
||||
import { eSendEvent, presentSheet, ToastEvent } from "./event-manager";
|
||||
import Config from "react-native-config";
|
||||
|
||||
import SettingsService from "./settings";
|
||||
import { sleep } from "../utils/time";
|
||||
let premiumStatus = 0;
|
||||
let products = [];
|
||||
let user = null;
|
||||
@@ -61,16 +60,17 @@ async function setPremiumStatus() {
|
||||
}
|
||||
} catch (e) {
|
||||
premiumStatus = 0;
|
||||
} finally {
|
||||
if (get()) {
|
||||
await subscriptions.clear();
|
||||
}
|
||||
try {
|
||||
await RNIap.initConnection();
|
||||
products = await RNIap.getSubscriptions(itemSkus);
|
||||
} catch (e) {
|
||||
console.log("subscriptions: ", e);
|
||||
}
|
||||
}
|
||||
if (Config.GITHUB_RELEASE) return;
|
||||
|
||||
if (get()) {
|
||||
await subscriptions.clear();
|
||||
}
|
||||
try {
|
||||
await RNIap.initConnection();
|
||||
products = await RNIap.getSubscriptions(itemSkus);
|
||||
} catch (e) {
|
||||
console.log("subscriptions: ", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user