Skip to content

Commit e55dd92

Browse files
authored
fix: Remove List footer to prevent thread load animation (#6579)
1 parent 950347d commit e55dd92

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

app/views/RoomView/List/definitions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export interface IListContainerProps {
2222
renderRow: Function;
2323
rid: string;
2424
tmid?: string;
25-
loading: boolean;
2625
listRef: TListRef;
2726
hideSystemMessages: string[];
2827
showMessageInMainThread: boolean;

app/views/RoomView/List/index.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import React, { forwardRef, useImperativeHandle } from 'react';
22

3-
import ActivityIndicator from '../../../containers/ActivityIndicator';
43
import { useDebounce } from '../../../lib/methods/helpers';
54
import { EmptyRoom, List } from './components';
65
import { IListContainerProps, IListContainerRef, IListProps } from './definitions';
76
import { useMessages, useScroll } from './hooks';
87

98
const ListContainer = forwardRef<IListContainerRef, IListContainerProps>(
10-
({ rid, tmid, renderRow, showMessageInMainThread, serverVersion, hideSystemMessages, listRef, loading }, ref) => {
9+
({ rid, tmid, renderRow, showMessageInMainThread, serverVersion, hideSystemMessages, listRef }, ref) => {
1110
const [messages, messagesIds, fetchMessages] = useMessages({
1211
rid,
1312
tmid,
@@ -33,13 +32,6 @@ const ListContainer = forwardRef<IListContainerRef, IListContainerProps>(
3332
cancelJumpToMessage
3433
}));
3534

36-
const renderFooter = () => {
37-
if (loading && rid) {
38-
return <ActivityIndicator />;
39-
}
40-
return null;
41-
};
42-
4335
const renderItem: IListProps['renderItem'] = ({ item, index }) => renderRow(item, messages[index + 1], highlightedMessageId);
4436

4537
return (
@@ -50,7 +42,6 @@ const ListContainer = forwardRef<IListContainerRef, IListContainerProps>(
5042
data={messages}
5143
renderItem={renderItem}
5244
onEndReached={onEndReached}
53-
ListFooterComponent={renderFooter}
5445
onScrollToIndexFailed={handleScrollToIndexFailed}
5546
viewabilityConfigCallbackPairs={viewabilityConfigCallbackPairs.current}
5647
jumpToBottom={jumpToBottom}

app/views/RoomView/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
14971497

14981498
render() {
14991499
console.count(`${this.constructor.name}.render calls`);
1500-
const { room, loading, action, selectedMessages, isAutocompleteVisible } = this.state;
1500+
const { room, action, selectedMessages, isAutocompleteVisible } = this.state;
15011501
const { user, baseUrl, theme, width, serverVersion, navigation, encryptionEnabled } = this.props;
15021502
const { rid, t } = room;
15031503
let bannerClosed;
@@ -1552,7 +1552,6 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
15521552
rid={rid}
15531553
tmid={this.tmid}
15541554
renderRow={this.renderItem}
1555-
loading={loading}
15561555
hideSystemMessages={this.hideSystemMessages}
15571556
showMessageInMainThread={user.showMessageInMainThread ?? false}
15581557
serverVersion={serverVersion}

0 commit comments

Comments
 (0)