Show bubble tile timestamps for bubble layout inside the bubble (#7622)

This commit is contained in:
Michael Telatynski 2022-01-25 13:10:17 +00:00 committed by GitHub
parent 8ddd677c35
commit fb49ccce35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 66 additions and 11 deletions

View file

@ -1273,12 +1273,13 @@ export default class EventTile extends React.Component<IProps, IState> {
? this.props.mxEvent.getTs()
: thread?.lastReply().getTs();
const timestamp = showTimestamp && ts ?
<MessageTimestamp
showRelative={this.props.tileShape === TileShape.ThreadPanel}
showTwelveHour={this.props.isTwelveHour}
ts={ts}
/> : null;
const messageTimestamp = <MessageTimestamp
showRelative={this.props.tileShape === TileShape.ThreadPanel}
showTwelveHour={this.props.isTwelveHour}
ts={ts}
/>;
const timestamp = showTimestamp && ts ? messageTimestamp : null;
const keyRequestHelpText =
<div className="mx_EventTile_keyRequestInfo_tooltip_contents">
@ -1339,9 +1340,10 @@ export default class EventTile extends React.Component<IProps, IState> {
{ timestamp }
</a>;
const useIRCLayout = this.props.layout == Layout.IRC;
const useIRCLayout = this.props.layout === Layout.IRC;
const groupTimestamp = !useIRCLayout ? linkedTimestamp : null;
const ircTimestamp = useIRCLayout ? linkedTimestamp : null;
const bubbleTimestamp = this.props.layout === Layout.Bubble ? messageTimestamp : null;
const groupPadlock = !useIRCLayout && !isBubbleMessage && this.renderE2EPadlock();
const ircPadlock = useIRCLayout && !isBubbleMessage && this.renderE2EPadlock();
@ -1567,7 +1569,8 @@ export default class EventTile extends React.Component<IProps, IState> {
{ groupTimestamp }
{ groupPadlock }
{ replyChain }
<EventTileType ref={this.tile}
<EventTileType
ref={this.tile}
mxEvent={this.props.mxEvent}
forExport={this.props.forExport}
replacingEventId={this.props.replacingEventId}
@ -1580,6 +1583,7 @@ export default class EventTile extends React.Component<IProps, IState> {
callEventGrouper={this.props.callEventGrouper}
getRelationsForEvent={this.props.getRelationsForEvent}
isSeeingThroughMessageHiddenForModeration={isSeeingThroughMessageHiddenForModeration}
timestamp={bubbleTimestamp}
/>
{ keyRequestInfo }
{ actionBar }