mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 10:15:43 +03:00
don't fire share dialog when clicking timestamp of event,
it was tripping people up and broke search permalinks Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
5b027c6410
commit
67f803bc5f
1 changed files with 2 additions and 13 deletions
|
@ -439,17 +439,6 @@ module.exports = withMatrixClient(React.createClass({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onPermalinkShareClicked: function(e) {
|
|
||||||
// These permalinks are like above, can be opened in new tab/window to matrix.to
|
|
||||||
// but otherwise fire the ShareDialog as it makes little sense to click permalink
|
|
||||||
// whilst it is in the current room
|
|
||||||
e.preventDefault();
|
|
||||||
const ShareDialog = sdk.getComponent("dialogs.ShareDialog");
|
|
||||||
Modal.createTrackedDialog('share room event dialog', '', ShareDialog, {
|
|
||||||
target: this.props.mxEvent,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
_renderE2EPadlock: function() {
|
_renderE2EPadlock: function() {
|
||||||
const ev = this.props.mxEvent;
|
const ev = this.props.mxEvent;
|
||||||
const props = {onClick: this.onCryptoClicked};
|
const props = {onClick: this.onCryptoClicked};
|
||||||
|
@ -680,7 +669,7 @@ module.exports = withMatrixClient(React.createClass({
|
||||||
{ avatar }
|
{ avatar }
|
||||||
{ sender }
|
{ sender }
|
||||||
<div className="mx_EventTile_reply">
|
<div className="mx_EventTile_reply">
|
||||||
<a href={permalink} onClick={this.onPermalinkShareClicked}>
|
<a href={permalink} onClick={this.onPermalinkClicked}>
|
||||||
{ timestamp }
|
{ timestamp }
|
||||||
</a>
|
</a>
|
||||||
{ this._renderE2EPadlock() }
|
{ this._renderE2EPadlock() }
|
||||||
|
@ -707,7 +696,7 @@ module.exports = withMatrixClient(React.createClass({
|
||||||
{ avatar }
|
{ avatar }
|
||||||
{ sender }
|
{ sender }
|
||||||
<div className="mx_EventTile_line">
|
<div className="mx_EventTile_line">
|
||||||
<a href={permalink} onClick={this.onPermalinkShareClicked}>
|
<a href={permalink} onClick={this.onPermalinkClicked}>
|
||||||
{ timestamp }
|
{ timestamp }
|
||||||
</a>
|
</a>
|
||||||
{ this._renderE2EPadlock() }
|
{ this._renderE2EPadlock() }
|
||||||
|
|
Loading…
Reference in a new issue