From 645f900a36ec45e53e4214dc7ea5d2331f666a6e Mon Sep 17 00:00:00 2001 From: Timo <16718859+toger5@users.noreply.github.com> Date: Tue, 16 Nov 2021 17:09:19 +0100 Subject: [PATCH] Fix maximised / pinned widget state being loaded correctly (#7146) --- src/components/structures/RoomView.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 7f20d0c824..342a8c31f3 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -332,15 +332,15 @@ export class RoomView extends React.Component { private checkWidgets = (room) => { this.setState({ - hasPinnedWidgets: WidgetLayoutStore.instance.hasPinnedWidgets(this.state.room), - mainSplitContentType: this.getMainSplitContentType(), - showApps: this.shouldShowApps(this.state.room), + hasPinnedWidgets: WidgetLayoutStore.instance.hasPinnedWidgets(room), + mainSplitContentType: this.getMainSplitContentType(room), + showApps: this.shouldShowApps(room), }); }; - private getMainSplitContentType = () => { + private getMainSplitContentType = (room) => { // TODO-video check if video should be displayed in main panel - return (WidgetLayoutStore.instance.hasMaximisedWidget(this.state.room)) + return (WidgetLayoutStore.instance.hasMaximisedWidget(room)) ? MainSplitContentType.MaximisedWidget : MainSplitContentType.Timeline; };