mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
update user
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
|||||||
Linking,
|
Linking,
|
||||||
NativeModules,
|
NativeModules,
|
||||||
Platform,
|
Platform,
|
||||||
StatusBar
|
StatusBar,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import * as RNIap from 'react-native-iap';
|
import * as RNIap from 'react-native-iap';
|
||||||
import {enabled} from 'react-native-privacy-snapshot';
|
import {enabled} from 'react-native-privacy-snapshot';
|
||||||
@@ -19,10 +19,14 @@ import { DDS } from './src/services/DeviceDetection';
|
|||||||
import {
|
import {
|
||||||
eSendEvent,
|
eSendEvent,
|
||||||
eSubscribeEvent,
|
eSubscribeEvent,
|
||||||
eUnSubscribeEvent
|
eUnSubscribeEvent,
|
||||||
} from './src/services/EventManager';
|
} from './src/services/EventManager';
|
||||||
import IntentService from './src/services/IntentService';
|
import IntentService from './src/services/IntentService';
|
||||||
import { clearMessage, setLoginMessage } from './src/services/Message';
|
import {
|
||||||
|
clearMessage,
|
||||||
|
setEmailVerifyMessage,
|
||||||
|
setLoginMessage,
|
||||||
|
} from './src/services/Message';
|
||||||
import Navigation from './src/services/Navigation';
|
import Navigation from './src/services/Navigation';
|
||||||
import PremiumService from './src/services/PremiumService';
|
import PremiumService from './src/services/PremiumService';
|
||||||
import {editing} from './src/utils';
|
import {editing} from './src/utils';
|
||||||
@@ -36,7 +40,7 @@ import {
|
|||||||
eOpenPremiumDialog,
|
eOpenPremiumDialog,
|
||||||
eOpenSideMenu,
|
eOpenSideMenu,
|
||||||
eShowGetPremium,
|
eShowGetPremium,
|
||||||
eStartSyncer
|
eStartSyncer,
|
||||||
} from './src/utils/Events';
|
} from './src/utils/Events';
|
||||||
import {MMKV} from './src/utils/mmkv';
|
import {MMKV} from './src/utils/mmkv';
|
||||||
import {tabBarRef} from './src/utils/Refs';
|
import {tabBarRef} from './src/utils/Refs';
|
||||||
@@ -134,7 +138,7 @@ const App = () => {
|
|||||||
};
|
};
|
||||||
const startSyncer = async () => {
|
const startSyncer = async () => {
|
||||||
try {
|
try {
|
||||||
let user = await db.user.get();
|
let user = await db.user.getUser();
|
||||||
if (user) {
|
if (user) {
|
||||||
EV.subscribe('db:refresh', syncChanges);
|
EV.subscribe('db:refresh', syncChanges);
|
||||||
}
|
}
|
||||||
@@ -152,11 +156,10 @@ const App = () => {
|
|||||||
let url = res ? res.url : '';
|
let url = res ? res.url : '';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (url.startsWith('ShareMedia://dataUrl')) {
|
if (Platform.OS === 'ios' && url.startsWith('ShareMedia://dataUrl')) {
|
||||||
console.log(url);
|
|
||||||
_data = await ReceiveSharingIntent.getFileNames(url);
|
_data = await ReceiveSharingIntent.getFileNames(url);
|
||||||
_data = IntentService.iosSortedData(_data);
|
_data = IntentService.iosSortedData(_data);
|
||||||
}
|
|
||||||
if (_data) {
|
if (_data) {
|
||||||
IntentService.setIntent(_data);
|
IntentService.setIntent(_data);
|
||||||
IntentService.check((event) => {
|
IntentService.check((event) => {
|
||||||
@@ -165,6 +168,13 @@ const App = () => {
|
|||||||
Navigation.closeDrawer();
|
Navigation.closeDrawer();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else if (url.startsWith('https://notesnook.com/verify')) {
|
||||||
|
let user = await db.user.fetchUser();
|
||||||
|
dispatch({type: Actions.USER, user: user});
|
||||||
|
if (user.isEmailConfirmed) {
|
||||||
|
clearMessage(dispatch);
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e, 'ERROR HERE');
|
console.log(e, 'ERROR HERE');
|
||||||
}
|
}
|
||||||
@@ -252,6 +262,7 @@ const App = () => {
|
|||||||
try {
|
try {
|
||||||
dispatch({type: Actions.SYNCING, syncing: true});
|
dispatch({type: Actions.SYNCING, syncing: true});
|
||||||
await db.sync(false);
|
await db.sync(false);
|
||||||
|
dispatch({type: Actions.LAST_SYNC, lastSync: await db.lastSynced()});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
} finally {
|
} finally {
|
||||||
dispatch({type: Actions.SYNCING, syncing: false});
|
dispatch({type: Actions.SYNCING, syncing: false});
|
||||||
@@ -270,9 +281,7 @@ const App = () => {
|
|||||||
eSubscribeEvent('nointent', loadMainApp);
|
eSubscribeEvent('nointent', loadMainApp);
|
||||||
Appearance.addChangeListener(onSystemThemeChanged);
|
Appearance.addChangeListener(onSystemThemeChanged);
|
||||||
let unsub = NetInfo.addEventListener(onNetworkStateChanged);
|
let unsub = NetInfo.addEventListener(onNetworkStateChanged);
|
||||||
if (Platform.OS === 'ios') {
|
|
||||||
Linking.addEventListener('url', _handleIntent);
|
Linking.addEventListener('url', _handleIntent);
|
||||||
}
|
|
||||||
EV.subscribe('db:sync', dbSync);
|
EV.subscribe('db:sync', dbSync);
|
||||||
EV.subscribe('user:checkStatus', handlePremiumAccess);
|
EV.subscribe('user:checkStatus', handlePremiumAccess);
|
||||||
return () => {
|
return () => {
|
||||||
@@ -285,9 +294,7 @@ const App = () => {
|
|||||||
eUnSubscribeEvent('nointent', loadMainApp);
|
eUnSubscribeEvent('nointent', loadMainApp);
|
||||||
AppState.removeEventListener('change', onAppStateChanged);
|
AppState.removeEventListener('change', onAppStateChanged);
|
||||||
Appearance.removeChangeListener(onSystemThemeChanged);
|
Appearance.removeChangeListener(onSystemThemeChanged);
|
||||||
if (Platform.OS === 'ios') {
|
|
||||||
Linking.removeEventListener('url', _handleIntent);
|
Linking.removeEventListener('url', _handleIntent);
|
||||||
}
|
|
||||||
unsub();
|
unsub();
|
||||||
unsubIAP();
|
unsubIAP();
|
||||||
};
|
};
|
||||||
@@ -326,14 +333,19 @@ const App = () => {
|
|||||||
|
|
||||||
const getUser = async () => {
|
const getUser = async () => {
|
||||||
try {
|
try {
|
||||||
let user = await db.user.get();
|
let user = await db.user.fetchUser();
|
||||||
if (user) {
|
if (user) {
|
||||||
|
clearMessage(dispatch);
|
||||||
|
if (!user.isEmailConfirmed) {
|
||||||
|
setEmailVerifyMessage(dispatch);
|
||||||
|
}
|
||||||
dispatch({type: Actions.SYNCING, syncing: true});
|
dispatch({type: Actions.SYNCING, syncing: true});
|
||||||
dispatch({type: Actions.USER, user: user});
|
dispatch({type: Actions.USER, user: user});
|
||||||
await db.sync();
|
await db.sync();
|
||||||
|
dispatch({type: Actions.LAST_SYNC, lastSync: await db.lastSynced()});
|
||||||
dispatch({type: Actions.ALL});
|
dispatch({type: Actions.ALL});
|
||||||
await startSyncer();
|
await startSyncer();
|
||||||
clearMessage(dispatch);
|
|
||||||
} else {
|
} else {
|
||||||
setLoginMessage(dispatch);
|
setLoginMessage(dispatch);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,9 +27,18 @@
|
|||||||
android:windowSoftInputMode="adjustResize">
|
android:windowSoftInputMode="adjustResize">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<intent-filter android:label="Notesnook">
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<data android:scheme="https"
|
||||||
|
android:host="notesnook.com"
|
||||||
|
android:pathPrefix="/verify"></data>
|
||||||
|
|
||||||
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".IntentActivity"
|
android:name=".IntentActivity"
|
||||||
@@ -38,16 +47,12 @@
|
|||||||
android:noHistory="true">
|
android:noHistory="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.SEND" />
|
<action android:name="android.intent.action.SEND" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
||||||
<data android:mimeType="text/*" />
|
<data android:mimeType="text/*" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.PROCESS_TEXT" />
|
<action android:name="android.intent.action.PROCESS_TEXT" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
||||||
<data android:mimeType="text/*" />
|
<data android:mimeType="text/*" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|||||||
@@ -475,8 +475,7 @@ export const ActionSheetComponent = ({
|
|||||||
ToastEvent.show(e.message, 'error', 'local', 5000);
|
ToastEvent.show(e.message, 'error', 'local', 5000);
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
let user = await db.user.get();
|
dispatch({type: Actions.LAST_SYNC,lastSync: await db.lastSynced()});
|
||||||
dispatch({type: Actions.USER, user: user});
|
|
||||||
dispatch({type: Actions.ALL});
|
dispatch({type: Actions.ALL});
|
||||||
setRefreshing(false);
|
setRefreshing(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { Platform, StyleSheet, View } from 'react-native';
|
import { Platform, StyleSheet, View } from 'react-native';
|
||||||
import Animated from 'react-native-reanimated';
|
|
||||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||||
import { useTracked } from '../../provider';
|
import { useTracked } from '../../provider';
|
||||||
import { eSubscribeEvent, eUnSubscribeEvent } from '../../services/EventManager';
|
import { eSubscribeEvent, eUnSubscribeEvent } from '../../services/EventManager';
|
||||||
import Navigation from '../../services/Navigation';
|
import Navigation from '../../services/Navigation';
|
||||||
|
|
||||||
import { dWidth } from '../../utils';
|
import { dWidth } from '../../utils';
|
||||||
import { eScrollEvent } from '../../utils/Events';
|
import { eScrollEvent } from '../../utils/Events';
|
||||||
import { SIZE } from '../../utils/SizeUtils';
|
import { SIZE } from '../../utils/SizeUtils';
|
||||||
@@ -15,6 +13,7 @@ import {HeaderLeftMenu} from './HeaderLeftMenu';
|
|||||||
import { HeaderRightMenu } from './HeaderRightMenu';
|
import { HeaderRightMenu } from './HeaderRightMenu';
|
||||||
import { HeaderTitle } from './HeaderTitle';
|
import { HeaderTitle } from './HeaderTitle';
|
||||||
|
|
||||||
|
|
||||||
export const Header = ({root}) => {
|
export const Header = ({root}) => {
|
||||||
const [state] = useTracked();
|
const [state] = useTracked();
|
||||||
const {colors, currentScreen} = state;
|
const {colors, currentScreen} = state;
|
||||||
|
|||||||
@@ -188,11 +188,12 @@ const LoginDialog = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let user = await db.user.get();
|
let user = await db.user.getUser()
|
||||||
if (!user) throw new Error('Email or passoword incorrect!');
|
if (!user) throw new Error('Email or passoword incorrect!');
|
||||||
setStatus('Syncing Data');
|
setStatus('Syncing Data');
|
||||||
dispatch({type: Actions.USER, user: user});
|
dispatch({type: Actions.USER, user: user});
|
||||||
await db.sync();
|
await db.sync();
|
||||||
|
dispatch({type: Actions.LAST_SYNC,lastSync: await db.lastSynced()});
|
||||||
eSendEvent(eStartSyncer);
|
eSendEvent(eStartSyncer);
|
||||||
dispatch({type: Actions.ALL});
|
dispatch({type: Actions.ALL});
|
||||||
eSendEvent(refreshNotesPage);
|
eSendEvent(refreshNotesPage);
|
||||||
@@ -257,9 +258,10 @@ const LoginDialog = () => {
|
|||||||
|
|
||||||
let user;
|
let user;
|
||||||
try {
|
try {
|
||||||
user = await db.user.get();
|
user = await db.user.getUser()
|
||||||
setStatus('Setting up crenditials');
|
setStatus('Setting up crenditials');
|
||||||
dispatch({type: Actions.USER, user: user});
|
dispatch({type: Actions.USER, user: user});
|
||||||
|
dispatch({type: Actions.LAST_SYNC,lastSync: await db.lastSynced()});
|
||||||
eSendEvent(eStartSyncer);
|
eSendEvent(eStartSyncer);
|
||||||
clearMessage(dispatch);
|
clearMessage(dispatch);
|
||||||
close();
|
close();
|
||||||
|
|||||||
@@ -57,8 +57,7 @@ export const UserSection = ({noTextMode}) => {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
ToastEvent.show(e.message, 'error');
|
ToastEvent.show(e.message, 'error');
|
||||||
} finally {
|
} finally {
|
||||||
let user = await db.user.get();
|
dispatch({type: Actions.LAST_SYNC,lastSync: await db.lastSynced()});
|
||||||
dispatch({type: Actions.USER, user: user});
|
|
||||||
dispatch({type: Actions.ALL});
|
dispatch({type: Actions.ALL});
|
||||||
dispatch({
|
dispatch({
|
||||||
type: Actions.SYNCING,
|
type: Actions.SYNCING,
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class PendingDialog extends React.Component {
|
|||||||
|
|
||||||
async open() {
|
async open() {
|
||||||
actionSheet.current?._setModalVisible(true);
|
actionSheet.current?._setModalVisible(true);
|
||||||
let u = await db.user.get();
|
let u = await db.user.fetchUser();
|
||||||
this.setState({
|
this.setState({
|
||||||
user: u && u.Id ? u : null,
|
user: u && u.Id ? u : null,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class PremiumDialog extends React.Component {
|
|||||||
|
|
||||||
async getSkus() {
|
async getSkus() {
|
||||||
try {
|
try {
|
||||||
let u = await db.user.get();
|
let u = await db.user.getUser()
|
||||||
this.setState({
|
this.setState({
|
||||||
user: u,
|
user: u,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ class RecoveryKeyDialog extends React.Component {
|
|||||||
|
|
||||||
onOpen = async () => {
|
onOpen = async () => {
|
||||||
let k = await db.user.key();
|
let k = await db.user.key();
|
||||||
this.user = await db.user.get();
|
this.user = await db.user.getUser();
|
||||||
|
|
||||||
if (k) {
|
if (k) {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import {TouchableOpacity, View} from 'react-native';
|
import { View } from 'react-native';
|
||||||
import Animated, { Easing, useValue } from 'react-native-reanimated';
|
import Animated, { Easing, useValue } from 'react-native-reanimated';
|
||||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
||||||
import { useTracked } from '../../provider';
|
import { useTracked } from '../../provider';
|
||||||
import { Actions } from '../../provider/Actions';
|
import { Actions } from '../../provider/Actions';
|
||||||
import { eSendEvent, ToastEvent } from '../../services/EventManager';
|
import { eSendEvent, ToastEvent } from '../../services/EventManager';
|
||||||
@@ -10,7 +9,7 @@ import {db} from '../../utils/DB';
|
|||||||
import {
|
import {
|
||||||
eOpenMoveNoteDialog,
|
eOpenMoveNoteDialog,
|
||||||
eOpenSimpleDialog,
|
eOpenSimpleDialog,
|
||||||
refreshNotesPage,
|
refreshNotesPage
|
||||||
} from '../../utils/Events';
|
} from '../../utils/Events';
|
||||||
import { SIZE } from '../../utils/SizeUtils';
|
import { SIZE } from '../../utils/SizeUtils';
|
||||||
import { sleep } from '../../utils/TimeUtils';
|
import { sleep } from '../../utils/TimeUtils';
|
||||||
|
|||||||
@@ -156,8 +156,7 @@ const SimpleList = ({
|
|||||||
if (refreshCallback) {
|
if (refreshCallback) {
|
||||||
refreshCallback();
|
refreshCallback();
|
||||||
}
|
}
|
||||||
let user = await db.user.get();
|
dispatch({type: Actions.LAST_SYNC,lastSync: await db.lastSynced()});
|
||||||
dispatch({type: Actions.USER, user: user});
|
|
||||||
dispatch({type: Actions.ALL});
|
dispatch({type: Actions.ALL});
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|||||||
@@ -31,5 +31,6 @@ export const Actions = {
|
|||||||
LOADING:"loading",
|
LOADING:"loading",
|
||||||
FULLSCREEN:"fullscreen",
|
FULLSCREEN:"fullscreen",
|
||||||
DEVICE_MODE:"deviceMode",
|
DEVICE_MODE:"deviceMode",
|
||||||
MENU_PINS:"menuPins"
|
MENU_PINS:"menuPins",
|
||||||
|
LAST_SYNC:"lastSynced"
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -81,5 +81,6 @@ export const defaultState = {
|
|||||||
icon: 'account-outline',
|
icon: 'account-outline',
|
||||||
},
|
},
|
||||||
keyword: [],
|
keyword: [],
|
||||||
menuPins:[]
|
menuPins:[],
|
||||||
|
lastSynced:"Never"
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -259,6 +259,13 @@ export const reducer = (state, action) => {
|
|||||||
menuPins: db.settings.pins,
|
menuPins: db.settings.pins,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
case Actions.LAST_SYNC: {
|
||||||
|
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
menuPins: action.lastSync,
|
||||||
|
};
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
throw new Error('unknown action type');
|
throw new Error('unknown action type');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +1,50 @@
|
|||||||
import { Actions } from "../provider/Actions";
|
import {Actions} from '../provider/Actions';
|
||||||
import { eOpenLoginDialog } from "../utils/Events";
|
import {eOpenLoginDialog} from '../utils/Events';
|
||||||
import { eSendEvent } from "./EventManager";
|
import {eSendEvent} from './EventManager';
|
||||||
|
|
||||||
export function setLoginMessage(dispatch) {
|
export function setLoginMessage(dispatch) {
|
||||||
dispatch({type:Actions.MESSAGE_BOARD_STATE,state:{
|
dispatch({
|
||||||
|
type: Actions.MESSAGE_BOARD_STATE,
|
||||||
|
state: {
|
||||||
visible: true,
|
visible: true,
|
||||||
message: 'You are not logged in',
|
message: 'You are not logged in',
|
||||||
actionText:"Login to sync your notes",
|
actionText: 'Login to sync your notes',
|
||||||
onPress: () => {
|
onPress: () => {
|
||||||
eSendEvent(eOpenLoginDialog);
|
eSendEvent(eOpenLoginDialog);
|
||||||
},
|
},
|
||||||
data: {},
|
data: {},
|
||||||
icon:'account-outline'
|
icon: 'account-outline',
|
||||||
}});
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setEmailVerifyMessage(dispatch) {
|
||||||
|
dispatch({
|
||||||
|
type: Actions.MESSAGE_BOARD_STATE,
|
||||||
|
state: {
|
||||||
|
visible: true,
|
||||||
|
message: 'Email not verified',
|
||||||
|
actionText: 'Please verify your email to sync notes',
|
||||||
|
onPress: () => {
|
||||||
|
// Handle this
|
||||||
|
//eSendEvent(eOpen)
|
||||||
|
},
|
||||||
|
data: {},
|
||||||
|
icon: 'account-outline',
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function clearMessage(dispatch) {
|
export function clearMessage(dispatch) {
|
||||||
dispatch({type:Actions.MESSAGE_BOARD_STATE,state:{
|
dispatch({
|
||||||
|
type: Actions.MESSAGE_BOARD_STATE,
|
||||||
|
state: {
|
||||||
visible: false,
|
visible: false,
|
||||||
message: '',
|
message: '',
|
||||||
actionText:"",
|
actionText: '',
|
||||||
onPress: null,
|
onPress: null,
|
||||||
data: {},
|
data: {},
|
||||||
icon:'account-outline'
|
icon: 'account-outline',
|
||||||
}});
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@ let premiumStatus = true;
|
|||||||
async function setPremiumStatus() {
|
async function setPremiumStatus() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let user = await db.user.get();
|
let user = await db.user.getUser();
|
||||||
if (!user || !user.id) {
|
if (!user || !user.id) {
|
||||||
premiumStatus = null;
|
premiumStatus = null;
|
||||||
} else {
|
} else {
|
||||||
@@ -30,7 +30,7 @@ async function verify(callback,error) {
|
|||||||
|
|
||||||
return; */
|
return; */
|
||||||
try {
|
try {
|
||||||
let user = await db.user.get();
|
let user = await db.user.getUser();
|
||||||
|
|
||||||
if (!user || !user.id || premiumStatus) {
|
if (!user || !user.id || premiumStatus) {
|
||||||
if (error) {
|
if (error) {
|
||||||
|
|||||||
@@ -31,6 +31,6 @@ export function validateUsername(username) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function checkPremiumUser() {
|
export async function checkPremiumUser() {
|
||||||
let user = await db.user.get();
|
//let user = await db.user.get();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user