mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Fix auto-pinned widget ordering
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
334ab12c47
commit
2b9c2daaf4
1 changed files with 10 additions and 0 deletions
|
@ -168,6 +168,16 @@ export default class WidgetStore extends AsyncStoreWithClient<IState> {
|
|||
}
|
||||
|
||||
public pinWidget(widgetId: string) {
|
||||
const roomId = this.getRoomId(widgetId);
|
||||
const roomInfo = this.getRoom(roomId);
|
||||
if (!roomInfo) return;
|
||||
|
||||
// When pinning, first confirm all the widgets (Jitsi) which were autopinned so that the order is correct
|
||||
const autoPinned = this.getPinnedApps(roomId).filter(app => !roomInfo.pinned[app.id]);
|
||||
autoPinned.forEach(app => {
|
||||
this.setPinned(app.id, true);
|
||||
});
|
||||
|
||||
this.setPinned(widgetId, true);
|
||||
|
||||
// Show the apps drawer upon the user pinning a widget
|
||||
|
|
Loading…
Reference in a new issue