FIX:Indicator color (#7581)

This commit is contained in:
Marcos Rodriguez Vélez 2025-02-11 20:39:48 -04:00 committed by GitHub
parent 175a5f27aa
commit 54db4b366e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,6 +14,7 @@ import {
StyleSheet, StyleSheet,
Text, Text,
View, View,
RefreshControl,
} from 'react-native'; } from 'react-native';
import { Icon } from '@rneui/themed'; import { Icon } from '@rneui/themed';
import * as BlueElectrum from '../../blue_modules/BlueElectrum'; import * as BlueElectrum from '../../blue_modules/BlueElectrum';
@ -268,6 +269,7 @@ const WalletTransactions: React.FC<WalletTransactionsProps> = ({ route }) => {
}, [getTransactions, limit]); }, [getTransactions, limit]);
const renderItem = useCallback( const renderItem = useCallback(
// eslint-disable-next-line react/no-unused-prop-types
({ item }: { item: Transaction }) => { ({ item }: { item: Transaction }) => {
return <TransactionListItem item={item} itemPriceUnit={wallet?.preferredBalanceUnit} walletID={walletID} />; return <TransactionListItem item={item} itemPriceUnit={wallet?.preferredBalanceUnit} walletID={walletID} />;
}, },
@ -374,8 +376,6 @@ const WalletTransactions: React.FC<WalletTransactionsProps> = ({ route }) => {
}, [refreshTransactions, setReloadTransactionsMenuActionFunction]), }, [refreshTransactions, setReloadTransactionsMenuActionFunction]),
); );
const refreshProps = isDesktop || isElectrumDisabled ? {} : { refreshing: isLoading, onRefresh: refreshTransactions };
const [balance, setBalance] = useState(wallet ? wallet.getBalance() : 0); const [balance, setBalance] = useState(wallet ? wallet.getBalance() : 0);
useEffect(() => { useEffect(() => {
if (!wallet) return; if (!wallet) return;
@ -488,7 +488,7 @@ const WalletTransactions: React.FC<WalletTransactionsProps> = ({ route }) => {
return ( return (
<View style={[styles.flex, { backgroundColor: colors.background }]}> <View style={[styles.flex, { backgroundColor: colors.background }]}>
{/* The color of the refresh indicator. Temporaary hack */} {/* The color of the refresh indicator. Temporary hack */}
<View <View
style={[ style={[
styles.refreshIndicatorBackground, styles.refreshIndicatorBackground,
@ -502,7 +502,6 @@ const WalletTransactions: React.FC<WalletTransactionsProps> = ({ route }) => {
onEndReachedThreshold={0.3} onEndReachedThreshold={0.3}
onEndReached={loadMoreTransactions} onEndReached={loadMoreTransactions}
ListFooterComponent={renderListFooterComponent} ListFooterComponent={renderListFooterComponent}
{...refreshProps}
data={listData} data={listData}
extraData={wallet} extraData={wallet}
keyExtractor={_keyExtractor} keyExtractor={_keyExtractor}
@ -524,6 +523,11 @@ const WalletTransactions: React.FC<WalletTransactionsProps> = ({ route }) => {
{isLightning() && <Text style={styles.emptyTxsLightning}>{loc.wallets.list_empty_txs2_lightning}</Text>} {isLightning() && <Text style={styles.emptyTxsLightning}>{loc.wallets.list_empty_txs2_lightning}</Text>}
</ScrollView> </ScrollView>
} }
refreshControl={
!isDesktop && !isElectrumDisabled ? (
<RefreshControl refreshing={isLoading} onRefresh={refreshTransactions} tintColor={colors.msSuccessCheck} />
) : undefined
}
/> />
<FContainer ref={walletActionButtonsRef}> <FContainer ref={walletActionButtonsRef}>
{wallet?.allowReceive() && ( {wallet?.allowReceive() && (