Fix naive pinning limit and app tile widgetMessaging NPE

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-10-06 10:48:55 +01:00
parent 39c49125ce
commit 17a04f2915
2 changed files with 3 additions and 3 deletions

View file

@ -171,7 +171,7 @@ export default class WidgetStore extends AsyncStoreWithClient<IState> {
const roomId = this.getRoomId(widgetId);
const roomInfo = this.getRoom(roomId);
return roomInfo && Object.keys(roomInfo.pinned).filter(k => {
return roomInfo.widgets.some(app => app.id === k);
return roomInfo.pinned[k] && roomInfo.widgets.some(app => app.id === k);
}).length < 2;
}