Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 282618d

Browse files
committed
separate concepts of showing and managing RRs to fix regression
1 parent 6077693 commit 282618d

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

src/components/structures/MessagePanel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ module.exports = React.createClass({
6565
suppressFirstDateSeparator: React.PropTypes.bool,
6666

6767
// whether to show read receipts
68-
manageReadReceipts: React.PropTypes.bool,
68+
showReadReceipts: React.PropTypes.bool,
6969

7070
// true if updates to the event list should cause the scroll panel to
7171
// scroll down when we are at the bottom of the window. See ScrollPanel
@@ -491,7 +491,7 @@ module.exports = React.createClass({
491491
var scrollToken = mxEv.status ? undefined : eventId;
492492

493493
var readReceipts;
494-
if (this.props.manageReadReceipts) {
494+
if (this.props.showReadReceipts) {
495495
readReceipts = this._getReadReceiptsForEvent(mxEv);
496496
}
497497
ret.push(

src/components/structures/RoomView.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,18 +1715,19 @@ module.exports = React.createClass({
17151715
// console.log("ShowUrlPreview for %s is %s", this.state.room.roomId, this.state.showUrlPreview);
17161716
var messagePanel = (
17171717
<TimelinePanel ref={this._gatherTimelinePanelRef}
1718-
timelineSet={this.state.room.getUnfilteredTimelineSet()}
1719-
manageReadReceipts={!UserSettingsStore.getSyncedSetting('hideReadReceipts', false)}
1720-
manageReadMarkers={true}
1721-
hidden={hideMessagePanel}
1722-
highlightedEventId={highlightedEventId}
1723-
eventId={this.state.initialEventId}
1724-
eventPixelOffset={this.state.initialEventPixelOffset}
1725-
onScroll={ this.onMessageListScroll }
1726-
onReadMarkerUpdated={ this._updateTopUnreadMessagesBar }
1727-
showUrlPreview = { this.state.showUrlPreview }
1728-
opacity={ this.props.opacity }
1729-
className="mx_RoomView_messagePanel"
1718+
timelineSet={this.state.room.getUnfilteredTimelineSet()}
1719+
showReadReceipts={!UserSettingsStore.getSyncedSetting('hideReadReceipts', false)}
1720+
manageReadReceipts={true}
1721+
manageReadMarkers={true}
1722+
hidden={hideMessagePanel}
1723+
highlightedEventId={highlightedEventId}
1724+
eventId={this.state.initialEventId}
1725+
eventPixelOffset={this.state.initialEventPixelOffset}
1726+
onScroll={ this.onMessageListScroll }
1727+
onReadMarkerUpdated={ this._updateTopUnreadMessagesBar }
1728+
showUrlPreview = { this.state.showUrlPreview }
1729+
opacity={ this.props.opacity }
1730+
className="mx_RoomView_messagePanel"
17301731
/>);
17311732

17321733
var topUnreadMessagesBar = null;

src/components/structures/TimelinePanel.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ var TimelinePanel = React.createClass({
5959
// that room.
6060
timelineSet: React.PropTypes.object.isRequired,
6161

62+
showReadReceipts: React.PropTypes.bool,
6263
// Enable managing RRs and RMs. These require the timelineSet to have a room.
6364
manageReadReceipts: React.PropTypes.bool,
6465
manageReadMarkers: React.PropTypes.bool,
@@ -1140,8 +1141,8 @@ var TimelinePanel = React.createClass({
11401141
readMarkerEventId={ this.state.readMarkerEventId }
11411142
readMarkerVisible={ this.state.readMarkerVisible }
11421143
suppressFirstDateSeparator={ this.state.canBackPaginate }
1143-
showUrlPreview = { this.props.showUrlPreview }
1144-
manageReadReceipts = { this.props.manageReadReceipts }
1144+
showUrlPreview={ this.props.showUrlPreview }
1145+
showReadReceipts={ this.props.showReadReceipts }
11451146
ourUserId={ MatrixClientPeg.get().credentials.userId }
11461147
stickyBottom={ stickyBottom }
11471148
onScroll={ this.onMessageListScroll }

0 commit comments

Comments
 (0)