Skip to content

PRD-2109: Chat list loading indicator extra space fix#18

Merged
veliseev93 merged 4 commits intodevelopmentfrom
PRD-2109-chat-list-loading-indicator-extra-space-fix
Dec 29, 2025
Merged

PRD-2109: Chat list loading indicator extra space fix#18
veliseev93 merged 4 commits intodevelopmentfrom
PRD-2109-chat-list-loading-indicator-extra-space-fix

Conversation

@Tomass673
Copy link
Collaborator

@Tomass673 Tomass673 self-assigned this Dec 22, 2025
@Tomass673 Tomass673 changed the base branch from main to development December 22, 2025 14:30
@Tomass673 Tomass673 assigned veliseev93 and unassigned Tomass673 Dec 23, 2025
@Tomass673
Copy link
Collaborator Author

@veliseev93 please take a look

// NOTE: Reset scroll position when refresh completes to remove extra space left by refresh control
useEffect(() => {
if (previousIsRefetchingRef.current && !isRefetching && listRef.current) {
listRef.current.scrollToOffset({ offset: 0, animated: false });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solves the problem, but it seems that now, after a refresh, the chat list jumps up a little—it used to move more smoothly before. Could you please fix this issue?

Simulator.Screen.Recording.-.iPhone.17.-.2025-12-23.at.18.02.40.mov

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, i made scroll-resetting logic stricter

@veliseev93 veliseev93 assigned Tomass673 and unassigned veliseev93 Dec 23, 2025
Base automatically changed from development to production December 24, 2025 08:54
@Tomass673 Tomass673 assigned veliseev93 and unassigned Tomass673 Dec 24, 2025
@Tomass673 Tomass673 requested a review from veliseev93 December 24, 2025 09:24
@veliseev93 veliseev93 changed the base branch from production to development December 24, 2025 13:12
}}
transformSectionTitle={transformSectionTitle}
onEndReached={fetchNextPage}
refreshControl={<AppRefreshControl onRefresh={refetch} refreshing={isRefetching} />}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tomass673 It seems that now I can reproduce the original bug with the spinning loader again.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the original issue. When screen is unfocused and refetch starts - AppRefreshControl triggers iOS "[UIKitCore] A UIRefreshControl received offscreen beginRefreshing" warning. That's why content inset is still there after navigating back to chat list screen

Copy link
Contributor

@veliseev93 veliseev93 Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tomass673 Good idea, but could we just use useIsFocused hook here, since we use this condition in rendering?

import { useIsFocused } from '@react-navigation/native';

const isFocused = useIsFocused();

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, done

@veliseev93 veliseev93 assigned Tomass673 and unassigned veliseev93 Dec 25, 2025
@Tomass673 Tomass673 requested a review from veliseev93 December 25, 2025 15:38
@Tomass673 Tomass673 assigned veliseev93 and unassigned Tomass673 Dec 25, 2025
@veliseev93 veliseev93 assigned Tomass673 and unassigned veliseev93 Dec 26, 2025
@Tomass673 Tomass673 assigned veliseev93 and unassigned Tomass673 Dec 26, 2025
@veliseev93 veliseev93 merged commit 5d963b9 into development Dec 29, 2025
1 check passed
@veliseev93 veliseev93 deleted the PRD-2109-chat-list-loading-indicator-extra-space-fix branch December 29, 2025 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants