Fix bug where layout changes wouldn't scroll messages to bottom

This commit is contained in:
Kristóf Tóth 2019-09-04 15:46:52 +02:00
parent 0019683b21
commit e951c5cb6f
1 changed files with 4 additions and 2 deletions

View File

@ -55,7 +55,10 @@ export class DashboardComponent implements OnInit, OnDestroy {
}
subscribeResizeOnLayoutChange() {
this.configService.layout.subscribe(() => this.emitResizeEvent());
this.configService.layout.subscribe(() => {
this.emitResizeEvent();
setTimeout(() => this.scrollMessagesToBottom(), 0);
});
}
initCommandHandling() {
@ -89,7 +92,6 @@ export class DashboardComponent implements OnInit, OnDestroy {
setLayout(layout: string) {
this.layout.next(layout);
this.emitResizeEvent();
}
emitResizeEvent() {