mirror of https://github.com/vector-im/riot-web
Render ordering changes in the AppsDrawer
parent
0001e1e684
commit
2548a438ae
|
@ -30,10 +30,10 @@ import {IntegrationManagers} from "../../../integrations/IntegrationManagers";
|
||||||
import SettingsStore from "../../../settings/SettingsStore";
|
import SettingsStore from "../../../settings/SettingsStore";
|
||||||
import {useLocalStorageState} from "../../../hooks/useLocalStorageState";
|
import {useLocalStorageState} from "../../../hooks/useLocalStorageState";
|
||||||
import ResizeNotifier from "../../../utils/ResizeNotifier";
|
import ResizeNotifier from "../../../utils/ResizeNotifier";
|
||||||
import WidgetStore from "../../../stores/WidgetStore";
|
|
||||||
import ResizeHandle from "../elements/ResizeHandle";
|
import ResizeHandle from "../elements/ResizeHandle";
|
||||||
import Resizer from "../../../resizer/resizer";
|
import Resizer from "../../../resizer/resizer";
|
||||||
import PercentageDistributor from "../../../resizer/distributors/percentage";
|
import PercentageDistributor from "../../../resizer/distributors/percentage";
|
||||||
|
import {Container, WidgetLayoutStore} from "../../../stores/widgets/WidgetLayoutStore";
|
||||||
|
|
||||||
export default class AppsDrawer extends React.Component {
|
export default class AppsDrawer extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
@ -62,13 +62,13 @@ export default class AppsDrawer extends React.Component {
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
ScalarMessaging.startListening();
|
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);
|
this.dispatcherRef = dis.register(this.onAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
ScalarMessaging.stopListening();
|
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.dispatcherRef) dis.unregister(this.dispatcherRef);
|
||||||
if (this._resizeContainer) {
|
if (this._resizeContainer) {
|
||||||
this.resizer.detach();
|
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 = () => {
|
_updateApps = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|
Loading…
Reference in New Issue