mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-17 12:40:28 +03:00
added read receipt support
This commit is contained in:
parent
8d4e796f42
commit
683ce431db
4 changed files with 17 additions and 4 deletions
|
|
@ -15,6 +15,7 @@ import {
|
|||
openCreateChannel,
|
||||
openPublicChannels,
|
||||
openInviteUser,
|
||||
openReadReceipts,
|
||||
} from '../../../client/action/navigation';
|
||||
import { searchEmoji } from '../emoji-board/emoji';
|
||||
|
||||
|
|
@ -143,11 +144,13 @@ function FollowingMembers({ roomId, roomTimeline, viewEvent }) {
|
|||
};
|
||||
}, [roomTimeline]);
|
||||
|
||||
const lastMEvent = roomTimeline.timeline[roomTimeline.timeline.length - 1];
|
||||
return followingMembers.length !== 0 && (
|
||||
<TimelineChange
|
||||
variant="follow"
|
||||
content={getUsersActionJsx(followingMembers, 'following the conversation.')}
|
||||
time=""
|
||||
onClick={() => openReadReceipts(roomId, lastMEvent.getId())}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { redactEvent, sendReaction } from '../../../client/action/roomTimeline';
|
|||
import { getUsername, doesRoomHaveUnread } from '../../../util/matrixUtil';
|
||||
import colorMXID from '../../../util/colorMXID';
|
||||
import { diffMinutes, isNotInSameDay } from '../../../util/common';
|
||||
import { openEmojiBoard } from '../../../client/action/navigation';
|
||||
import { openEmojiBoard, openReadReceipts } from '../../../client/action/navigation';
|
||||
|
||||
import Divider from '../../atoms/divider/Divider';
|
||||
import Avatar from '../../atoms/avatar/Avatar';
|
||||
|
|
@ -32,6 +32,7 @@ import TimelineChange from '../../molecules/message/TimelineChange';
|
|||
|
||||
import ReplyArrowIC from '../../../../public/res/ic/outlined/reply-arrow.svg';
|
||||
import EmojiAddIC from '../../../../public/res/ic/outlined/emoji-add.svg';
|
||||
import TickMarkIC from '../../../../public/res/ic/outlined/tick-mark.svg';
|
||||
import BinIC from '../../../../public/res/ic/outlined/bin.svg';
|
||||
|
||||
import { parseReply, parseTimelineChange } from './common';
|
||||
|
|
@ -321,6 +322,12 @@ function genMessage(roomId, prevMEvent, mEvent, roomTimeline, viewEvent) {
|
|||
size="extra-small"
|
||||
tooltip="Reply"
|
||||
/>
|
||||
<IconButton
|
||||
onClick={() => openReadReceipts(roomId, mEvent.getId())}
|
||||
src={TickMarkIC}
|
||||
size="extra-small"
|
||||
tooltip="Read receipts"
|
||||
/>
|
||||
{(canIRedact || mEvent.getSender() === mx.getUserId()) && (
|
||||
<IconButton
|
||||
onClick={() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue