mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
clean up
This commit is contained in:
@@ -90,20 +90,6 @@ const App = () => {
|
||||
const [, dispatch] = useTracked(),
|
||||
[init, setInit] = useState(false);
|
||||
|
||||
const _onOrientationChange = (o) => {
|
||||
return;
|
||||
/* let smallTab = DDS.isSmallTab;
|
||||
DDS.setNewValues();
|
||||
DDS.checkSmallTab(o);
|
||||
if (smallTab === DDS.isSmallTab) {
|
||||
return;
|
||||
}
|
||||
I = DDS.isLargeTablet() ? require('./index.tablet') : require('./RootView');
|
||||
|
||||
setTimeout(() => {
|
||||
resetApp();
|
||||
}, 1000); */
|
||||
};
|
||||
const syncChanges = async () => {
|
||||
dispatch({type: Actions.ALL});
|
||||
},
|
||||
@@ -139,7 +125,6 @@ const App = () => {
|
||||
useEffect(() => {
|
||||
eSubscribeEvent(eStartSyncer, startSyncer);
|
||||
eSubscribeEvent(eResetApp, resetApp);
|
||||
Orientation.addOrientationListener(_onOrientationChange);
|
||||
eSubscribeEvent(eDispatchAction, (type) => {
|
||||
dispatch(type);
|
||||
});
|
||||
@@ -153,7 +138,6 @@ const App = () => {
|
||||
eUnSubscribeEvent(eDispatchAction, (type) => {
|
||||
dispatch(type);
|
||||
});
|
||||
Orientation.removeOrientationListener(_onOrientationChange);
|
||||
AppState.removeEventListener('change', onAppStateChanged);
|
||||
Appearance.removeChangeListener(onSystemThemeChanged);
|
||||
unsub();
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
import React, {useEffect, useState} from 'react';
|
||||
import {FlatList, Platform, Text, View} from 'react-native';
|
||||
import {useSafeAreaInsets} from 'react-native-safe-area-context';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { FlatList, Platform, View } from 'react-native';
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import RNFetchBlob from 'rn-fetch-blob';
|
||||
import {useTracked} from '../../provider';
|
||||
import {Actions} from '../../provider/Actions';
|
||||
import {DDS} from '../../services/DeviceDetection';
|
||||
import { useTracked } from '../../provider';
|
||||
import { Actions } from '../../provider/Actions';
|
||||
import { DDS } from '../../services/DeviceDetection';
|
||||
import {
|
||||
eSubscribeEvent,
|
||||
eUnSubscribeEvent,
|
||||
ToastEvent,
|
||||
ToastEvent
|
||||
} from '../../services/EventManager';
|
||||
import {getElevation} from '../../utils';
|
||||
import {db} from '../../utils/DB';
|
||||
import {eCloseRestoreDialog, eOpenRestoreDialog} from '../../utils/Events';
|
||||
import {ph, SIZE, WEIGHT} from '../../utils/SizeUtils';
|
||||
import { getElevation } from '../../utils';
|
||||
import { db } from '../../utils/DB';
|
||||
import { eCloseRestoreDialog, eOpenRestoreDialog } from '../../utils/Events';
|
||||
import { ph, SIZE } from '../../utils/SizeUtils';
|
||||
import storage from '../../utils/storage';
|
||||
import {sleep} from '../../utils/TimeUtils';
|
||||
import {Button} from '../Button';
|
||||
import { sleep } from '../../utils/TimeUtils';
|
||||
import { Button } from '../Button';
|
||||
import BaseDialog from '../Dialog/base-dialog';
|
||||
import DialogButtons from '../Dialog/dialog-buttons';
|
||||
import DialogHeader from '../Dialog/dialog-header';
|
||||
import {Loading} from '../Loading';
|
||||
import { Loading } from '../Loading';
|
||||
import Paragraph from '../Typography/Paragraph';
|
||||
|
||||
const RestoreDialog = () => {
|
||||
@@ -132,6 +132,7 @@ const RestoreDialog = () => {
|
||||
maxHeight: '85%',
|
||||
}}>
|
||||
<FlatList
|
||||
|
||||
data={files}
|
||||
keyExtractor={(item, index) => item.filename}
|
||||
renderItem={({item, index}) => (
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
import React, {useCallback, useEffect, useState} from 'react';
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
import {
|
||||
Platform,
|
||||
RefreshControl,
|
||||
StyleSheet,
|
||||
Text,
|
||||
|
||||
useWindowDimensions,
|
||||
View,
|
||||
View
|
||||
} from 'react-native';
|
||||
import {DataProvider, LayoutProvider, RecyclerListView} from 'recyclerlistview';
|
||||
import {useTracked} from '../../provider';
|
||||
import {Actions} from '../../provider/Actions';
|
||||
import {DDS} from '../../services/DeviceDetection';
|
||||
import {eSendEvent, ToastEvent} from '../../services/EventManager';
|
||||
import {db} from '../../utils/DB';
|
||||
import { DataProvider, LayoutProvider, RecyclerListView } from 'recyclerlistview';
|
||||
import { useTracked } from '../../provider';
|
||||
import { Actions } from '../../provider/Actions';
|
||||
import { DDS } from '../../services/DeviceDetection';
|
||||
import { eSendEvent, ToastEvent } from '../../services/EventManager';
|
||||
import { db } from '../../utils/DB';
|
||||
import {
|
||||
eOpenJumpToDialog,
|
||||
eOpenLoginDialog,
|
||||
eScrollEvent,
|
||||
eScrollEvent
|
||||
} from '../../utils/Events';
|
||||
import {SIZE, WEIGHT} from '../../utils/SizeUtils';
|
||||
import {Button} from '../Button';
|
||||
import {HeaderMenu} from '../Header/HeaderMenu';
|
||||
import { SIZE } from '../../utils/SizeUtils';
|
||||
import { Button } from '../Button';
|
||||
import { HeaderMenu } from '../Header/HeaderMenu';
|
||||
import Seperator from '../Seperator';
|
||||
import TagItem from '../TagItem';
|
||||
import Heading from '../Typography/Heading';
|
||||
import Paragraph from '../Typography/Paragraph';
|
||||
import {ListHeaderComponent} from './ListHeaderComponent';
|
||||
import {NotebookItemWrapper} from './NotebookItemWrapper';
|
||||
import {NoteItemWrapper} from './NoteItemWrapper';
|
||||
import { ListHeaderComponent } from './ListHeaderComponent';
|
||||
import { NotebookItemWrapper } from './NotebookItemWrapper';
|
||||
import { NoteItemWrapper } from './NoteItemWrapper';
|
||||
|
||||
const header = {
|
||||
type: 'MAIN_HEADER',
|
||||
|
||||
@@ -24,8 +24,7 @@ export const injectedJS = ` setTimeout(() => {
|
||||
link.href = './site/index.html?${params}';
|
||||
link.click();
|
||||
}
|
||||
},1000);
|
||||
true;
|
||||
},100);
|
||||
`;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user