mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-17 04:30:29 +03:00
Bug fixed
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
14cd84dab7
commit
1137c11c59
6 changed files with 13 additions and 30 deletions
|
|
@ -8,7 +8,7 @@ import dateFormat from 'dateformat';
|
|||
import initMatrix from '../../../client/initMatrix';
|
||||
import cons from '../../../client/state/cons';
|
||||
import { redactEvent, sendReaction } from '../../../client/action/roomTimeline';
|
||||
import { getUsername, getUsernameOfRoomMember, doesRoomHaveUnread } from '../../../util/matrixUtil';
|
||||
import { getUsername, getUsernameOfRoomMember } from '../../../util/matrixUtil';
|
||||
import colorMXID from '../../../util/colorMXID';
|
||||
import { diffMinutes, isNotInSameDay, getEventCords } from '../../../util/common';
|
||||
import { openEmojiBoard, openProfileViewer, openReadReceipts } from '../../../client/action/navigation';
|
||||
|
|
@ -191,6 +191,7 @@ function RoomViewContent({
|
|||
const [onPagination, setOnPagination] = useState(null);
|
||||
const [editEvent, setEditEvent] = useState(null);
|
||||
const mx = initMatrix.matrixClient;
|
||||
const noti = initMatrix.notifications;
|
||||
|
||||
function autoLoadTimeline() {
|
||||
if (timelineScroll.isScrollable() === true) return;
|
||||
|
|
@ -199,7 +200,7 @@ function RoomViewContent({
|
|||
function trySendingReadReceipt() {
|
||||
const { room, timeline } = roomTimeline;
|
||||
if (
|
||||
(doesRoomHaveUnread(room) || initMatrix.notifications.hasNoti(roomId))
|
||||
(noti.doesRoomHaveUnread(room) || noti.hasNoti(roomId))
|
||||
&& timeline.length !== 0) {
|
||||
mx.sendReadReceipt(timeline[timeline.length - 1]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue