mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +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 {
|
||||
Modal,
|
||||
Platform,
|
||||
StyleSheet,
|
||||
Text,
|
||||
TouchableOpacity,
|
||||
View,
|
||||
Platform,
|
||||
} from 'react-native';
|
||||
import FileViewer from 'react-native-file-viewer';
|
||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||
import {opacity, ph, pv, SIZE, WEIGHT} from '../../common/common';
|
||||
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 FileViewer from 'react-native-file-viewer';
|
||||
import Seperator from '../Seperator';
|
||||
|
||||
const {
|
||||
eSubscribeEvent,
|
||||
@@ -22,10 +25,6 @@ const {
|
||||
eOpenExportDialog,
|
||||
eCloseExportDialog,
|
||||
} = 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 [state, dispatch] = useTracked();
|
||||
@@ -174,7 +173,7 @@ const ExportDialog = () => {
|
||||
</Text>
|
||||
<View style={styles.buttonContainer}>
|
||||
{actions.map((item) => (
|
||||
<>
|
||||
<Fragment key={item.title}>
|
||||
<Seperator half />
|
||||
<Button
|
||||
width="100%"
|
||||
@@ -183,7 +182,7 @@ const ExportDialog = () => {
|
||||
activeOpacity={opacity}
|
||||
onPress={item.func}
|
||||
/>
|
||||
</>
|
||||
</Fragment>
|
||||
))}
|
||||
</View>
|
||||
</>
|
||||
|
||||
@@ -33,7 +33,9 @@ const SimpleList = ({
|
||||
const {colors, selectionMode, user} = state;
|
||||
const searchResults = {...state.searchResults};
|
||||
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 listData = data;
|
||||
const _onScroll = (event) => {
|
||||
@@ -52,6 +54,7 @@ const SimpleList = ({
|
||||
/* for (var i = 0; i < 10000; i++) {
|
||||
d = [...d,...data];
|
||||
} */
|
||||
console.log(d,"D")
|
||||
setDataProvider(
|
||||
new DataProvider((r1, r2) => {
|
||||
return r1 !== r2;
|
||||
@@ -228,10 +231,10 @@ const SimpleList = ({
|
||||
width: '100%',
|
||||
paddingTop:
|
||||
Platform.OS == 'ios'
|
||||
? data[0] && !selectionMode
|
||||
? listData[0] && !selectionMode
|
||||
? 115
|
||||
: 115 - 60
|
||||
: data[0] && !selectionMode
|
||||
: listData[0] && !selectionMode
|
||||
? 155 - insets.top
|
||||
: 155 - insets.top - 60,
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user