mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
Respect the roomState right container request for the Jitsi widget (#7033)
This commit is contained in:
parent
a4e20c7b41
commit
82c2102ccb
@ -207,15 +207,14 @@ export class WidgetLayoutStore extends ReadyWatchingStore {
|
||||
const isLegacyPinned = !!legacyPinned?.[widget.id];
|
||||
const defaultContainer = WidgetType.JITSI.matches(widget.type) ? Container.Top : Container.Right;
|
||||
|
||||
if (manualContainer === Container.Right) {
|
||||
rightWidgets.push(widget);
|
||||
} else if (manualContainer === Container.Top || stateContainer === Container.Top) {
|
||||
topWidgets.push(widget);
|
||||
let targetContainer = defaultContainer;
|
||||
if (!!manualContainer || !!stateContainer) {
|
||||
targetContainer = (manualContainer) ? manualContainer : stateContainer;
|
||||
} else if (isLegacyPinned && !stateContainer) {
|
||||
topWidgets.push(widget);
|
||||
} else {
|
||||
(defaultContainer === Container.Top ? topWidgets : rightWidgets).push(widget);
|
||||
// Special legacy case
|
||||
targetContainer = Container.Top;
|
||||
}
|
||||
(targetContainer === Container.Top ? topWidgets : rightWidgets).push(widget);
|
||||
}
|
||||
|
||||
// Trim to MAX_PINNED
|
||||
|
Loading…
Reference in New Issue
Block a user