From f05fb29c7b907eaab92bac786903b838258d7869 Mon Sep 17 00:00:00 2001 From: Gigi Date: Tue, 14 Oct 2025 01:05:22 +0200 Subject: [PATCH] refactor: remove refresh spinner and text from pull-to-refresh - Remove 'Refreshing...' text from indicator - Remove spinner from pull-to-refresh (button already spins) - Only show indicator when actively pulling, not when refreshing - Simplify logic and improve UX consistency --- src/components/PullToRefreshIndicator.tsx | 30 +++++++++-------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/src/components/PullToRefreshIndicator.tsx b/src/components/PullToRefreshIndicator.tsx index 930eb9ef..c5108b8c 100644 --- a/src/components/PullToRefreshIndicator.tsx +++ b/src/components/PullToRefreshIndicator.tsx @@ -1,6 +1,6 @@ import React from 'react' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' -import { faArrowDown, faSpinner } from '@fortawesome/free-solid-svg-icons' +import { faArrowDown } from '@fortawesome/free-solid-svg-icons' interface PullToRefreshIndicatorProps { isPulling: boolean @@ -17,8 +17,8 @@ const PullToRefreshIndicator: React.FC = ({ isRefreshing, threshold = 80 }) => { - // Don't show if not pulling and not refreshing - if (!isPulling && !isRefreshing) return null + // Only show when actively pulling, not when refreshing + if (!isPulling) return null const opacity = Math.min(pullDistance / threshold, 1) const rotation = (pullDistance / threshold) * 180 @@ -27,31 +27,23 @@ const PullToRefreshIndicator: React.FC = ({
- {isRefreshing ? ( - - ) : ( - - )} +
- {isRefreshing - ? 'Refreshing...' - : canRefresh - ? 'Release to refresh' - : 'Pull to refresh'} + {canRefresh ? 'Release to refresh' : 'Pull to refresh'}
)