projects
/
rainny.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da92ce3
)
add document.hasFocus check for incoming room events (#1252)
author
Thumbscrew
<thumbscrw@pm.me>
Sun, 28 May 2023 15:54:10 +0000
(16:54 +0100)
committer
GitHub
<noreply@github.com>
Sun, 28 May 2023 15:54:10 +0000
(21:24 +0530)
src/app/organisms/room/RoomViewContent.jsx
patch
|
blob
|
history
diff --git
a/src/app/organisms/room/RoomViewContent.jsx
b/src/app/organisms/room/RoomViewContent.jsx
index 74bc7e268ae765948299b72e52882ab322b35ebb..0a9256cebca1070e520b865e7cf7be79bb698bd4 100644
(file)
--- a/
src/app/organisms/room/RoomViewContent.jsx
+++ b/
src/app/organisms/room/RoomViewContent.jsx
@@
-358,7
+358,7
@@
function useEventArrive(roomTimeline, readUptoEvtStore, timelineScrollRef, event
const isViewingLive = roomTimeline.isServingLiveTimeline() && limit.length >= tLength - 1;
const isAttached = timelineScroll.bottom < SCROLL_TRIGGER_POS;
- if (isViewingLive && isAttached) {
+ if (isViewingLive && isAttached
&& document.hasFocus()
) {
limit.setFrom(tLength - limit.maxEvents);
trySendReadReceipt(event);
setEvent(event);