diff --git a/src/components/Transactions/List.tsx b/src/components/Transactions/List.tsx index ead1596..390d22c 100644 --- a/src/components/Transactions/List.tsx +++ b/src/components/Transactions/List.tsx @@ -1,7 +1,7 @@ import React, { useMemo } from 'react'; -import { Alert, RefreshControl, View } from 'react-native'; +import { Alert, RefreshControl } from 'react-native'; import { - Box, Button, Heading, HStack, Icon, Pressable, ScrollView, Skeleton, Text, VStack, + Box, HStack, Icon, Pressable, Skeleton, Text, VStack, } from 'native-base'; import { MaterialCommunityIcons, MaterialIcons } from '@expo/vector-icons'; import { SwipeListView } from 'react-native-swipe-list-view'; @@ -10,14 +10,13 @@ import Animated, { Layout } from 'react-native-reanimated'; import moment from 'moment'; import * as Haptics from 'expo-haptics'; import { ImpactFeedbackStyle } from 'expo-haptics'; -import { useDispatch, useSelector } from 'react-redux'; +import { useSelector } from 'react-redux'; import RangeTitle from '../UI/RangeTitle'; import colors from '../../constants/colors'; import { TransactionType } from '../../models/transactions'; -import { RootDispatch, RootState } from '../../store'; +import { RootState } from '../../store'; import { translate } from '../../i18n/locale'; -import {getLocales} from "expo-localization"; -import {localNumberFormat} from "../../lib/common"; +import { localNumberFormat } from '../../lib/common'; const Basic = ({ loadingRefresh, @@ -213,7 +212,7 @@ const Basic = ({ initialNumToRender={10} keyExtractor={(item: TransactionType) => item.id} showsVerticalScrollIndicator - onEndReached={onEndReached} + onEndReached={() => !(loadingRefresh || loadingMore) && onEndReached()} onEndReachedThreshold={0} data={!loadingRefresh ? transactions : []} renderItem={({ item }) => } diff --git a/src/models/currencies.ts b/src/models/currencies.ts index fa89181..0fad122 100644 --- a/src/models/currencies.ts +++ b/src/models/currencies.ts @@ -99,7 +99,6 @@ export default createModel()({ dispatch.accounts.getAccounts(), dispatch.categories.getInsightCategories(), ]); - dispatch.firefly.getBalances(); }, }), }); diff --git a/src/models/firefly.ts b/src/models/firefly.ts index 277e526..01a54be 100644 --- a/src/models/firefly.ts +++ b/src/models/firefly.ts @@ -213,8 +213,6 @@ export default createModel()({ dispatch.transactions.getTransactions(), dispatch.categories.getInsightCategories(), ]); - - //dispatch.firefly.getBalances(); }, /**