From 2548a438ae810444b379e6c760dbb305f63a2f7e Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 18 Jan 2021 17:41:54 -0700 Subject: [PATCH] Render ordering changes in the AppsDrawer --- src/components/views/rooms/AppsDrawer.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/views/rooms/AppsDrawer.js b/src/components/views/rooms/AppsDrawer.js index 3208844bc5..924cda0b64 100644 --- a/src/components/views/rooms/AppsDrawer.js +++ b/src/components/views/rooms/AppsDrawer.js @@ -30,10 +30,10 @@ import {IntegrationManagers} from "../../../integrations/IntegrationManagers"; import SettingsStore from "../../../settings/SettingsStore"; import {useLocalStorageState} from "../../../hooks/useLocalStorageState"; import ResizeNotifier from "../../../utils/ResizeNotifier"; -import WidgetStore from "../../../stores/WidgetStore"; import ResizeHandle from "../elements/ResizeHandle"; import Resizer from "../../../resizer/resizer"; import PercentageDistributor from "../../../resizer/distributors/percentage"; +import {Container, WidgetLayoutStore} from "../../../stores/widgets/WidgetLayoutStore"; export default class AppsDrawer extends React.Component { static propTypes = { @@ -62,13 +62,13 @@ export default class AppsDrawer extends React.Component { componentDidMount() { ScalarMessaging.startListening(); - WidgetStore.instance.on(this.props.room.roomId, this._updateApps); + WidgetLayoutStore.instance.on(WidgetLayoutStore.emissionForRoom(this.props.room), this._updateApps); this.dispatcherRef = dis.register(this.onAction); } componentWillUnmount() { ScalarMessaging.stopListening(); - WidgetStore.instance.off(this.props.room.roomId, this._updateApps); + WidgetLayoutStore.instance.off(WidgetLayoutStore.emissionForRoom(this.props.room), this._updateApps); if (this.dispatcherRef) dis.unregister(this.dispatcherRef); if (this._resizeContainer) { this.resizer.detach(); @@ -190,7 +190,7 @@ export default class AppsDrawer extends React.Component { } }; - _getApps = () => WidgetStore.instance.getPinnedApps(this.props.room.roomId); + _getApps = () => WidgetLayoutStore.instance.getContainerWidgets(this.props.room, Container.Top); _updateApps = () => { this.setState({