remove warnings

This commit is contained in:
ammarahm-ed
2020-09-24 09:51:15 +05:00
parent 51d4921bbf
commit 7ed3939414
2 changed files with 18 additions and 16 deletions

View File

@@ -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>
</>

View File

@@ -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,
}}