separate concepts of showing and managing RRs to fix regression
This commit is contained in:
parent
6077693829
commit
282618d5a1
3 changed files with 18 additions and 16 deletions
|
@ -65,7 +65,7 @@ module.exports = React.createClass({
|
||||||
suppressFirstDateSeparator: React.PropTypes.bool,
|
suppressFirstDateSeparator: React.PropTypes.bool,
|
||||||
|
|
||||||
// whether to show read receipts
|
// whether to show read receipts
|
||||||
manageReadReceipts: React.PropTypes.bool,
|
showReadReceipts: React.PropTypes.bool,
|
||||||
|
|
||||||
// true if updates to the event list should cause the scroll panel to
|
// true if updates to the event list should cause the scroll panel to
|
||||||
// scroll down when we are at the bottom of the window. See ScrollPanel
|
// scroll down when we are at the bottom of the window. See ScrollPanel
|
||||||
|
@ -491,7 +491,7 @@ module.exports = React.createClass({
|
||||||
var scrollToken = mxEv.status ? undefined : eventId;
|
var scrollToken = mxEv.status ? undefined : eventId;
|
||||||
|
|
||||||
var readReceipts;
|
var readReceipts;
|
||||||
if (this.props.manageReadReceipts) {
|
if (this.props.showReadReceipts) {
|
||||||
readReceipts = this._getReadReceiptsForEvent(mxEv);
|
readReceipts = this._getReadReceiptsForEvent(mxEv);
|
||||||
}
|
}
|
||||||
ret.push(
|
ret.push(
|
||||||
|
|
|
@ -1715,18 +1715,19 @@ module.exports = React.createClass({
|
||||||
// console.log("ShowUrlPreview for %s is %s", this.state.room.roomId, this.state.showUrlPreview);
|
// console.log("ShowUrlPreview for %s is %s", this.state.room.roomId, this.state.showUrlPreview);
|
||||||
var messagePanel = (
|
var messagePanel = (
|
||||||
<TimelinePanel ref={this._gatherTimelinePanelRef}
|
<TimelinePanel ref={this._gatherTimelinePanelRef}
|
||||||
timelineSet={this.state.room.getUnfilteredTimelineSet()}
|
timelineSet={this.state.room.getUnfilteredTimelineSet()}
|
||||||
manageReadReceipts={!UserSettingsStore.getSyncedSetting('hideReadReceipts', false)}
|
showReadReceipts={!UserSettingsStore.getSyncedSetting('hideReadReceipts', false)}
|
||||||
manageReadMarkers={true}
|
manageReadReceipts={true}
|
||||||
hidden={hideMessagePanel}
|
manageReadMarkers={true}
|
||||||
highlightedEventId={highlightedEventId}
|
hidden={hideMessagePanel}
|
||||||
eventId={this.state.initialEventId}
|
highlightedEventId={highlightedEventId}
|
||||||
eventPixelOffset={this.state.initialEventPixelOffset}
|
eventId={this.state.initialEventId}
|
||||||
onScroll={ this.onMessageListScroll }
|
eventPixelOffset={this.state.initialEventPixelOffset}
|
||||||
onReadMarkerUpdated={ this._updateTopUnreadMessagesBar }
|
onScroll={ this.onMessageListScroll }
|
||||||
showUrlPreview = { this.state.showUrlPreview }
|
onReadMarkerUpdated={ this._updateTopUnreadMessagesBar }
|
||||||
opacity={ this.props.opacity }
|
showUrlPreview = { this.state.showUrlPreview }
|
||||||
className="mx_RoomView_messagePanel"
|
opacity={ this.props.opacity }
|
||||||
|
className="mx_RoomView_messagePanel"
|
||||||
/>);
|
/>);
|
||||||
|
|
||||||
var topUnreadMessagesBar = null;
|
var topUnreadMessagesBar = null;
|
||||||
|
|
|
@ -59,6 +59,7 @@ var TimelinePanel = React.createClass({
|
||||||
// that room.
|
// that room.
|
||||||
timelineSet: React.PropTypes.object.isRequired,
|
timelineSet: React.PropTypes.object.isRequired,
|
||||||
|
|
||||||
|
showReadReceipts: React.PropTypes.bool,
|
||||||
// Enable managing RRs and RMs. These require the timelineSet to have a room.
|
// Enable managing RRs and RMs. These require the timelineSet to have a room.
|
||||||
manageReadReceipts: React.PropTypes.bool,
|
manageReadReceipts: React.PropTypes.bool,
|
||||||
manageReadMarkers: React.PropTypes.bool,
|
manageReadMarkers: React.PropTypes.bool,
|
||||||
|
@ -1140,8 +1141,8 @@ var TimelinePanel = React.createClass({
|
||||||
readMarkerEventId={ this.state.readMarkerEventId }
|
readMarkerEventId={ this.state.readMarkerEventId }
|
||||||
readMarkerVisible={ this.state.readMarkerVisible }
|
readMarkerVisible={ this.state.readMarkerVisible }
|
||||||
suppressFirstDateSeparator={ this.state.canBackPaginate }
|
suppressFirstDateSeparator={ this.state.canBackPaginate }
|
||||||
showUrlPreview = { this.props.showUrlPreview }
|
showUrlPreview={ this.props.showUrlPreview }
|
||||||
manageReadReceipts = { this.props.manageReadReceipts }
|
showReadReceipts={ this.props.showReadReceipts }
|
||||||
ourUserId={ MatrixClientPeg.get().credentials.userId }
|
ourUserId={ MatrixClientPeg.get().credentials.userId }
|
||||||
stickyBottom={ stickyBottom }
|
stickyBottom={ stickyBottom }
|
||||||
onScroll={ this.onMessageListScroll }
|
onScroll={ this.onMessageListScroll }
|
||||||
|
|
Loading…
Reference in a new issue