chat scrollback performance improved
This commit is contained in:
parent
ac4c0ec1f6
commit
e971069595
3 changed files with 6 additions and 5 deletions
|
@ -170,7 +170,7 @@
|
||||||
&-btns button {
|
&-btns button {
|
||||||
margin: var(--sp-tight) var(--sp-tight) 0 0;
|
margin: var(--sp-tight) var(--sp-tight) 0 0;
|
||||||
[dir=rtl] & {
|
[dir=rtl] & {
|
||||||
margin: 0 0 var(--sp-tight) var(--sp-tight);
|
margin: var(--sp-tight) 0 0 var(--sp-tight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,9 +46,9 @@ const MAX_MSG_DIFF_MINUTES = 5;
|
||||||
function genPlaceholders() {
|
function genPlaceholders() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PlaceholderMessage key={Math.random().toString(20).substr(2, 6)} />
|
<PlaceholderMessage key="placeholder-1" />
|
||||||
<PlaceholderMessage key={Math.random().toString(20).substr(2, 6)} />
|
<PlaceholderMessage key="placeholder-2" />
|
||||||
<PlaceholderMessage key={Math.random().toString(20).substr(2, 6)} />
|
<PlaceholderMessage key="placeholder-3" />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ function genChannelIntro(mEvent, roomTimeline) {
|
||||||
avatarSrc = isDM ? roomTimeline.room.getAvatarFallbackMember()?.getAvatarUrl(mx.baseUrl, 80, 80, 'crop') : avatarSrc;
|
avatarSrc = isDM ? roomTimeline.room.getAvatarFallbackMember()?.getAvatarUrl(mx.baseUrl, 80, 80, 'crop') : avatarSrc;
|
||||||
return (
|
return (
|
||||||
<ChannelIntro
|
<ChannelIntro
|
||||||
key={mEvent ? mEvent.getId() : Math.random().toString(20).substr(2, 6)}
|
key={mEvent ? mEvent.getId() : 'channel-intro'}
|
||||||
roomId={roomTimeline.roomId}
|
roomId={roomTimeline.roomId}
|
||||||
avatarSrc={avatarSrc}
|
avatarSrc={avatarSrc}
|
||||||
name={roomTimeline.room.name}
|
name={roomTimeline.room.name}
|
||||||
|
|
|
@ -32,6 +32,7 @@ class RoomTimeline extends EventEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.ongoingDecryptionCount !== 0) return;
|
if (this.ongoingDecryptionCount !== 0) return;
|
||||||
|
if (this.isOngoingPagination) return;
|
||||||
this.emit(cons.events.roomTimeline.EVENT);
|
this.emit(cons.events.roomTimeline.EVENT);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue