mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-18 06:35:35 +08:00
Merge pull request #208 from matrix-org/rav/missing_date_separator
Fix the missing date separator at the start of rooms
This commit is contained in:
commit
a841991952
@ -188,7 +188,7 @@ var TimelinePanel = React.createClass({
|
|||||||
|
|
||||||
debuglog("TimelinePanel: paginate complete backwards:"+backwards+"; success:"+r);
|
debuglog("TimelinePanel: paginate complete backwards:"+backwards+"; success:"+r);
|
||||||
this.setState({[statekey]: false});
|
this.setState({[statekey]: false});
|
||||||
this._onTimelineUpdated(r);
|
this._onTimelineUpdated();
|
||||||
return r;
|
return r;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -555,7 +555,7 @@ var TimelinePanel = React.createClass({
|
|||||||
// calling _onTimelineUpdated and updating the state.
|
// calling _onTimelineUpdated and updating the state.
|
||||||
|
|
||||||
var onLoaded = () => {
|
var onLoaded = () => {
|
||||||
this._onTimelineUpdated(true);
|
this._onTimelineUpdated();
|
||||||
|
|
||||||
this.setState({timelineLoading: false}, () => {
|
this.setState({timelineLoading: false}, () => {
|
||||||
// initialise the scroll state of the message panel
|
// initialise the scroll state of the message panel
|
||||||
@ -586,17 +586,15 @@ var TimelinePanel = React.createClass({
|
|||||||
prom.done();
|
prom.done();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onTimelineUpdated: function(gotResults) {
|
_onTimelineUpdated: function() {
|
||||||
// we might have switched rooms since the load started - just bin
|
// we might have switched rooms since the load started - just bin
|
||||||
// the results if so.
|
// the results if so.
|
||||||
if (this.unmounted) return;
|
if (this.unmounted) return;
|
||||||
|
|
||||||
if (gotResults) {
|
this.setState({
|
||||||
this.setState({
|
events: this._timelineWindow.getEvents(),
|
||||||
events: this._timelineWindow.getEvents(),
|
canBackPaginate: this._timelineWindow.canPaginate(EventTimeline.BACKWARDS),
|
||||||
canBackPaginate: this._timelineWindow.canPaginate(EventTimeline.BACKWARDS),
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_indexForEventId: function(evId) {
|
_indexForEventId: function(evId) {
|
||||||
|
Loading…
Reference in New Issue
Block a user