diff --git a/res/css/views/messages/_ReactionsRowButton.scss b/res/css/views/messages/_ReactionsRowButton.scss index 49e3930979..3c6d019b30 100644 --- a/res/css/views/messages/_ReactionsRowButton.scss +++ b/res/css/views/messages/_ReactionsRowButton.scss @@ -24,6 +24,7 @@ limitations under the License. border-radius: 10px; background-color: $reaction-row-button-bg-color; cursor: pointer; + user-select: none; &:hover { border-color: $reaction-row-button-hover-border-color; diff --git a/src/MatrixClientPeg.js b/src/MatrixClientPeg.js index 763eddbd5d..cd40c7874e 100644 --- a/src/MatrixClientPeg.js +++ b/src/MatrixClientPeg.js @@ -175,6 +175,8 @@ class MatrixClientPeg { } _createClient(creds: MatrixClientCreds) { + const aggregateRelations = SettingsStore.isFeatureEnabled("feature_reactions"); + const opts = { baseUrl: creds.homeserverUrl, idBaseUrl: creds.identityServerUrl, @@ -183,7 +185,8 @@ class MatrixClientPeg { deviceId: creds.deviceId, timelineSupport: true, forceTURN: !SettingsStore.getValue('webRtcAllowPeerToPeer', false), - verificationMethods: [verificationMethods.SAS] + verificationMethods: [verificationMethods.SAS], + unstableClientRelationAggregation: aggregateRelations, }; this.matrixClient = createMatrixClient(opts); diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index b57b659136..2037217710 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -92,6 +92,9 @@ module.exports = React.createClass({ // show timestamps always alwaysShowTimestamps: PropTypes.bool, + + // helper function to access relations for an event + getRelationsForEvent: PropTypes.func, }, componentWillMount: function() { @@ -511,22 +514,27 @@ module.exports = React.createClass({ readReceipts = this._getReadReceiptsForEvent(mxEv); } ret.push( -
  • - -
  • , +
  • + +
  • , ); return ret; diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index aa278f2349..17a062be98 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -1168,6 +1168,10 @@ const TimelinePanel = React.createClass({ }); }, + getRelationsForEvent(...args) { + return this.props.timelineSet.getRelationsForEvent(...args); + }, + render: function() { const MessagePanel = sdk.getComponent("structures.MessagePanel"); const Loader = sdk.getComponent("elements.Spinner"); @@ -1193,9 +1197,9 @@ const TimelinePanel = React.createClass({ if (this.state.events.length == 0 && !this.state.canBackPaginate && this.props.empty) { return ( -
    -
    { this.props.empty }
    -
    +
    +
    {this.props.empty}
    +
    ); } @@ -1217,28 +1221,29 @@ const TimelinePanel = React.createClass({ ); return (