From e951c5cb6f5f40c93ffb2c1d4506d321d8cd9cd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Wed, 4 Sep 2019 15:46:52 +0200 Subject: [PATCH] Fix bug where layout changes wouldn't scroll messages to bottom --- src/app/dashboard/dashboard.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts index 39aaa00..d445b81 100644 --- a/src/app/dashboard/dashboard.component.ts +++ b/src/app/dashboard/dashboard.component.ts @@ -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() {