PR feedback
This commit is contained in:
parent
37f1b4ba8a
commit
8b730c0a5d
1 changed files with 8 additions and 8 deletions
|
@ -75,7 +75,7 @@ module.exports = React.createClass({
|
||||||
syncState: MatrixClientPeg.get().getSyncState(),
|
syncState: MatrixClientPeg.get().getSyncState(),
|
||||||
hasUnsentMessages: this._hasUnsentMessages(room),
|
hasUnsentMessages: this._hasUnsentMessages(room),
|
||||||
callState: null,
|
callState: null,
|
||||||
readReceiptEventId: room.getEventReadUpTo(MatrixClientPeg.get().credentials.userId),
|
readMarkerEventId: room.getEventReadUpTo(MatrixClientPeg.get().credentials.userId),
|
||||||
readMarkerGhostEventId: undefined,
|
readMarkerGhostEventId: undefined,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -246,13 +246,13 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
onRoomReceipt: function(receiptEvent, room) {
|
onRoomReceipt: function(receiptEvent, room) {
|
||||||
if (room.roomId == this.props.roomId) {
|
if (room.roomId == this.props.roomId) {
|
||||||
var readReceiptEventId = this.state.room.getEventReadUpTo(MatrixClientPeg.get().credentials.userId);
|
var readMarkerEventId = this.state.room.getEventReadUpTo(MatrixClientPeg.get().credentials.userId);
|
||||||
var readMarkerGhostEventId = this.state.readMarkerGhostEventId;
|
var readMarkerGhostEventId = this.state.readMarkerGhostEventId;
|
||||||
if (this.state.readReceiptEventId !== undefined && this.state.readReceiptEventId != readReceiptEventId) {
|
if (this.state.readMarkerEventId !== undefined && this.state.readMarkerEventId != readMarkerEventId) {
|
||||||
readMarkerGhostEventId = this.state.readReceiptEventId;
|
readMarkerGhostEventId = this.state.readMarkerEventId;
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
readReceiptEventId: readReceiptEventId,
|
readMarkerEventId: readMarkerEventId,
|
||||||
readMarkerGhostEventId: readMarkerGhostEventId,
|
readMarkerGhostEventId: readMarkerGhostEventId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -683,7 +683,7 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// now we've decided whether or not to show this messages,
|
// now we've decided whether or not to show this message,
|
||||||
// add the read up to marker if appropriate
|
// add the read up to marker if appropriate
|
||||||
// doing this here means we implicitly do not show the marker
|
// doing this here means we implicitly do not show the marker
|
||||||
// if it's at the bottom
|
// if it's at the bottom
|
||||||
|
@ -692,7 +692,7 @@ module.exports = React.createClass({
|
||||||
// this is where we decide what messages we show so it's the only
|
// this is where we decide what messages we show so it's the only
|
||||||
// place we know whether we're at the bottom or not.
|
// place we know whether we're at the bottom or not.
|
||||||
var self = this;
|
var self = this;
|
||||||
if (prevEvent && prevEvent.getId() == this.state.readReceiptEventId) {
|
if (prevEvent && prevEvent.getId() == this.state.readMarkerEventId) {
|
||||||
var hr;
|
var hr;
|
||||||
hr = (<hr className="mx_RoomView_myReadMarker" style={{opacity: 1, width: '99%'}} ref={function(n) {
|
hr = (<hr className="mx_RoomView_myReadMarker" style={{opacity: 1, width: '99%'}} ref={function(n) {
|
||||||
self.readMarkerNode = n;
|
self.readMarkerNode = n;
|
||||||
|
@ -751,7 +751,7 @@ module.exports = React.createClass({
|
||||||
if (readMarkerIndex === undefined && ghostIndex && ghostIndex <= ret.length) {
|
if (readMarkerIndex === undefined && ghostIndex && ghostIndex <= ret.length) {
|
||||||
var hr;
|
var hr;
|
||||||
hr = (<hr className="mx_RoomView_myReadMarker" style={{opacity: 1, width: '85%'}} ref={function(n) {
|
hr = (<hr className="mx_RoomView_myReadMarker" style={{opacity: 1, width: '85%'}} ref={function(n) {
|
||||||
Velocity(n, {opacity: '0', width: '10%'}, {duration: 400, complete: function() {
|
Velocity(n, {opacity: '0', width: '10%'}, {duration: 400, easing: 'easeInSine', complete: function() {
|
||||||
self.setState({readMarkerGhostEventId: undefined});
|
self.setState({readMarkerGhostEventId: undefined});
|
||||||
}});
|
}});
|
||||||
}} />);
|
}} />);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue