import UserIC from '../../../../public/res/ic/outlined/user.svg';
import TickMarkIC from '../../../../public/res/ic/outlined/tick-mark.svg';
-function TimelineChange({ variant, content, time }) {
+function TimelineChange({ variant, content, time, onClick }) {
let iconSrc;
switch (variant) {
}
return (
- <div className="timeline-change">
+ <button style={{ cursor: onClick === null ? 'default' : 'pointer' }} onClick={onClick} type="button" className="timeline-change">
<div className="timeline-change__avatar-container">
<RawIcon src={iconSrc} size="extra-small" />
</div>
<div className="timeline-change__time">
<Text variant="b3">{time}</Text>
</div>
- </div>
+ </button>
);
}
TimelineChange.defaultProps = {
variant: 'other',
+ onClick: null,
};
TimelineChange.propTypes = {
PropTypes.node,
]).isRequired,
time: PropTypes.string.isRequired,
+ onClick: PropTypes.func,
};
export default TimelineChange;
padding-right: var(--sp-extra-tight);
display: flex;
align-items: center;
+ width: 100%;
&:hover {
background-color: var(--bg-surface-hover);
openCreateChannel,
openPublicChannels,
openInviteUser,
+ openReadReceipts,
} from '../../../client/action/navigation';
import { searchEmoji } from '../emoji-board/emoji';
};
}, [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())}
/>
);
}
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';
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';
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={() => {