Merge pull request #5553 from matrix-org/travis/widget-layout

Support room-defined widget layouts
This commit is contained in:
Travis Ralston 2021-01-21 13:22:52 -07:00 committed by GitHub
commit a779951512
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 855 additions and 272 deletions

View file

@ -78,6 +78,7 @@ import {UPDATE_EVENT} from "../../stores/AsyncStore";
import Notifier from "../../Notifier";
import {showToast as showNotificationsToast} from "../../toasts/DesktopNotificationsToast";
import { RoomNotificationStateStore } from "../../stores/notifications/RoomNotificationStateStore";
import { Container, WidgetLayoutStore } from "../../stores/widgets/WidgetLayoutStore";
const DEBUG = false;
let debuglog = function(msg: string) {};
@ -280,8 +281,8 @@ export default class RoomView extends React.Component<IProps, IState> {
private checkWidgets = (room) => {
this.setState({
hasPinnedWidgets: WidgetStore.instance.getPinnedApps(room.roomId).length > 0,
})
hasPinnedWidgets: WidgetLayoutStore.instance.getContainerWidgets(room, Container.Top).length > 0,
});
};
private onReadReceiptsChange = () => {