mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
remove warnings
This commit is contained in:
@@ -1,18 +1,21 @@
|
|||||||
import React, {useEffect, useState} from 'react';
|
import React, {Fragment, useEffect, useState} from 'react';
|
||||||
import {
|
import {
|
||||||
Modal,
|
Modal,
|
||||||
|
Platform,
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
Text,
|
Text,
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
View,
|
View,
|
||||||
Platform,
|
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
|
import FileViewer from 'react-native-file-viewer';
|
||||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
import {opacity, ph, pv, SIZE, WEIGHT} from '../../common/common';
|
import {opacity, ph, pv, SIZE, WEIGHT} from '../../common/common';
|
||||||
import {useTracked} from '../../provider';
|
import {useTracked} from '../../provider';
|
||||||
import {DDS, getElevation, db, ToastEvent} from '../../utils/utils';
|
import storage from '../../utils/storage';
|
||||||
|
import {DDS, getElevation, ToastEvent} from '../../utils/utils';
|
||||||
|
import {Button} from '../Button/index';
|
||||||
import {Loading} from '../Loading';
|
import {Loading} from '../Loading';
|
||||||
import FileViewer from 'react-native-file-viewer';
|
import Seperator from '../Seperator';
|
||||||
|
|
||||||
const {
|
const {
|
||||||
eSubscribeEvent,
|
eSubscribeEvent,
|
||||||
@@ -22,10 +25,6 @@ const {
|
|||||||
eOpenExportDialog,
|
eOpenExportDialog,
|
||||||
eCloseExportDialog,
|
eCloseExportDialog,
|
||||||
} = require('../../services/events');
|
} = require('../../services/events');
|
||||||
import {Button} from '../Button/index';
|
|
||||||
import Seperator from '../Seperator';
|
|
||||||
import storage from '../../utils/storage';
|
|
||||||
import RNFetchBlob from 'rn-fetch-blob';
|
|
||||||
|
|
||||||
const ExportDialog = () => {
|
const ExportDialog = () => {
|
||||||
const [state, dispatch] = useTracked();
|
const [state, dispatch] = useTracked();
|
||||||
@@ -174,7 +173,7 @@ const ExportDialog = () => {
|
|||||||
</Text>
|
</Text>
|
||||||
<View style={styles.buttonContainer}>
|
<View style={styles.buttonContainer}>
|
||||||
{actions.map((item) => (
|
{actions.map((item) => (
|
||||||
<>
|
<Fragment key={item.title}>
|
||||||
<Seperator half />
|
<Seperator half />
|
||||||
<Button
|
<Button
|
||||||
width="100%"
|
width="100%"
|
||||||
@@ -183,7 +182,7 @@ const ExportDialog = () => {
|
|||||||
activeOpacity={opacity}
|
activeOpacity={opacity}
|
||||||
onPress={item.func}
|
onPress={item.func}
|
||||||
/>
|
/>
|
||||||
</>
|
</Fragment>
|
||||||
))}
|
))}
|
||||||
</View>
|
</View>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ const SimpleList = ({
|
|||||||
const {colors, selectionMode, user} = state;
|
const {colors, selectionMode, user} = state;
|
||||||
const searchResults = {...state.searchResults};
|
const searchResults = {...state.searchResults};
|
||||||
const [refreshing, setRefreshing] = useState(false);
|
const [refreshing, setRefreshing] = useState(false);
|
||||||
const [dataProvider, setDataProvider] = useState(null);
|
const [dataProvider, setDataProvider] = useState(new DataProvider((r1, r2) => {
|
||||||
|
return r1 !== r2;
|
||||||
|
}).cloneWithRows([]));
|
||||||
const insets = useSafeAreaInsets();
|
const insets = useSafeAreaInsets();
|
||||||
const listData = data;
|
const listData = data;
|
||||||
const _onScroll = (event) => {
|
const _onScroll = (event) => {
|
||||||
@@ -52,6 +54,7 @@ const SimpleList = ({
|
|||||||
/* for (var i = 0; i < 10000; i++) {
|
/* for (var i = 0; i < 10000; i++) {
|
||||||
d = [...d,...data];
|
d = [...d,...data];
|
||||||
} */
|
} */
|
||||||
|
console.log(d,"D")
|
||||||
setDataProvider(
|
setDataProvider(
|
||||||
new DataProvider((r1, r2) => {
|
new DataProvider((r1, r2) => {
|
||||||
return r1 !== r2;
|
return r1 !== r2;
|
||||||
@@ -228,10 +231,10 @@ const SimpleList = ({
|
|||||||
width: '100%',
|
width: '100%',
|
||||||
paddingTop:
|
paddingTop:
|
||||||
Platform.OS == 'ios'
|
Platform.OS == 'ios'
|
||||||
? data[0] && !selectionMode
|
? listData[0] && !selectionMode
|
||||||
? 115
|
? 115
|
||||||
: 115 - 60
|
: 115 - 60
|
||||||
: data[0] && !selectionMode
|
: listData[0] && !selectionMode
|
||||||
? 155 - insets.top
|
? 155 - insets.top
|
||||||
: 155 - insets.top - 60,
|
: 155 - insets.top - 60,
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user