Skip to content

Commit 7ac852d

Browse files
committed
Merge pull request element-hq#2 from vector-im/timestamp_hover
Show timestamp when you hover over a message
2 parents a24d7a9 + c726257 commit 7ac852d

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

‎skins/base/css/molecules/MessageTile.css‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ limitations under the License.
2626
padding-right: 12px;
2727
margin-left: -64px;
2828
margin-top: -7px;
29-
float: left;
29+
float: left;
3030
}
3131

3232
.mx_MessageTile_avatar img {
@@ -78,3 +78,15 @@ limitations under the License.
7878
.mx_MessageTile_msgOption {
7979
float: right;
8080
}
81+
82+
.mx_MessageTimestamp {
83+
display: none;
84+
}
85+
86+
.mx_MessageTile_last .mx_MessageTimestamp {
87+
display: block;
88+
}
89+
90+
.mx_MessageTile:hover .mx_MessageTimestamp {
91+
display: block;
92+
}

‎skins/base/views/molecules/MessageTile.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ module.exports = React.createClass({
5757
mx_MessageTile_notSent: this.props.mxEvent.status == 'not_sent',
5858
mx_MessageTile_highlight: this.shouldHighlight(),
5959
mx_MessageTile_continuation: this.props.continuation,
60+
mx_MessageTile_last: this.props.last
6061
});
61-
var timestamp = this.props.last ? <MessageTimestamp ts={this.props.mxEvent.getTs()} /> : null;
62+
var timestamp = <MessageTimestamp ts={this.props.mxEvent.getTs()} />
6263
var avatar, sender, resend;
6364
if (!this.props.continuation) {
6465
avatar = (
@@ -84,4 +85,3 @@ module.exports = React.createClass({
8485
);
8586
},
8687
});
87-

0 commit comments

Comments
 (0)