diff --git a/res/css/views/rooms/_EventTile.scss b/res/css/views/rooms/_EventTile.scss
index f4c12bb734..8f67069c82 100644
--- a/res/css/views/rooms/_EventTile.scss
+++ b/res/css/views/rooms/_EventTile.scss
@@ -377,6 +377,14 @@ limitations under the License.
left: 41px;
}
+.mx_EventTile_content .mx_EventTile_edited {
+ user-select: none;
+ font-size: 12px;
+ color: $roomtopic-color;
+ display: inline-block;
+ margin-left: 9px;
+}
+
/* Various markdown overrides */
.mx_EventTile_content .markdown-body {
diff --git a/src/components/views/messages/TextualBody.js b/src/components/views/messages/TextualBody.js
index 34769c060f..0ca4711b07 100644
--- a/src/components/views/messages/TextualBody.js
+++ b/src/components/views/messages/TextualBody.js
@@ -22,6 +22,7 @@ import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import highlight from 'highlight.js';
import * as HtmlUtils from '../../../HtmlUtils';
+import {formatDate} from '../../../DateUtils';
import sdk from '../../../index';
import ScalarAuthClient from '../../../ScalarAuthClient';
import Modal from '../../../Modal';
@@ -148,6 +149,7 @@ module.exports = React.createClass({
nextProps.highlightLink !== this.props.highlightLink ||
nextProps.showUrlPreview !== this.props.showUrlPreview ||
nextState.links !== this.state.links ||
+ nextState.editedMarkerHovered !== this.state.editedMarkerHovered ||
nextState.widgetHidden !== this.state.widgetHidden);
},
@@ -432,6 +434,31 @@ module.exports = React.createClass({
});
},
+ _onMouseEnterEditedMarker: function() {
+ this.setState({editedMarkerHovered: true});
+ },
+
+ _onMouseLeaveEditedMarker: function() {
+ this.setState({editedMarkerHovered: false});
+ },
+
+ _renderEditedMarker: function() {
+ let editedTooltip;
+ if (this.state.editedMarkerHovered) {
+ const Tooltip = sdk.getComponent('elements.Tooltip');
+ const editEvent = this.props.mxEvent.replacingEvent();
+ const date = editEvent && formatDate(editEvent.getDate());
+ editedTooltip =