Render Jitsi (and other sticky widgets) in PiP container, so it can be dragged and the "jump to room functionality" is provided (#7450)

Co-authored-by: J. Ryan Stinnett <jryans@gmail.com>
This commit is contained in:
Timo 2022-01-13 12:10:41 +01:00 committed by GitHub
parent 8b01b68fa3
commit ef95644e23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 396 additions and 342 deletions

View file

@ -135,7 +135,7 @@ export default class Stickerpicker extends React.PureComponent<IProps, IState> {
// Close the sticker picker when the window resizes
window.addEventListener('resize', this.onResize);
this.dispatcherRef = dis.register(this.onWidgetAction);
this.dispatcherRef = dis.register(this.onAction);
// Track updates to widget state in account data
MatrixClientPeg.get().on('accountData', this.updateWidget);
@ -198,7 +198,7 @@ export default class Stickerpicker extends React.PureComponent<IProps, IState> {
});
};
private onWidgetAction = (payload: ActionPayload): void => {
private onAction = (payload: ActionPayload): void => {
switch (payload.action) {
case "user_widget_updated":
this.forceUpdate();