use ResizeNotifier as well to relayout room list

This commit is contained in:
Bruno Windels 2019-03-12 18:00:05 +01:00
parent 4795625cee
commit bab2730d40
4 changed files with 16 additions and 6 deletions

View file

@ -31,11 +31,13 @@ export default class ResizeNotifier extends EventEmitter {
}
notifyBannersChanged() {
this.emit("leftPanelResized");
this.emit("middlePanelResized");
}
// can be called in quick succession
notifyLeftHandleResized() {
// don't emit event for own region
this._throttledMiddlePanel();
}
@ -46,6 +48,12 @@ export default class ResizeNotifier extends EventEmitter {
// can be called in quick succession
notifyWindowResized() {
// no need to throttle this one,
// also it could make scrollbars appear for
// a split second when the room list manual layout is now
// taller than the available space
this.emit("leftPanelResized");
this._throttledMiddlePanel();
}
}