mirror of https://github.com/vector-im/riot-web
Fix naive pinning limit and app tile widgetMessaging NPE
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
39c49125ce
commit
17a04f2915
|
@ -563,8 +563,8 @@ export default class AppTile extends React.Component {
|
||||||
const canUserModify = this._canUserModify();
|
const canUserModify = this._canUserModify();
|
||||||
const showEditButton = Boolean(this._sgWidget.isManagedByManager && canUserModify);
|
const showEditButton = Boolean(this._sgWidget.isManagedByManager && canUserModify);
|
||||||
const showDeleteButton = (this.props.showDelete === undefined || this.props.showDelete) && canUserModify;
|
const showDeleteButton = (this.props.showDelete === undefined || this.props.showDelete) && canUserModify;
|
||||||
const showPictureSnapshotButton = this._sgWidget.widgetApi.hasCapability(MatrixCapabilities.Screenshots)
|
const showPictureSnapshotButton = this.props.show && this._sgWidget.widgetApi &&
|
||||||
&& this.props.show;
|
this._sgWidget.widgetApi.hasCapability(MatrixCapabilities.Screenshots);
|
||||||
|
|
||||||
const WidgetContextMenu = sdk.getComponent('views.context_menus.WidgetContextMenu');
|
const WidgetContextMenu = sdk.getComponent('views.context_menus.WidgetContextMenu');
|
||||||
contextMenu = (
|
contextMenu = (
|
||||||
|
|
|
@ -171,7 +171,7 @@ export default class WidgetStore extends AsyncStoreWithClient<IState> {
|
||||||
const roomId = this.getRoomId(widgetId);
|
const roomId = this.getRoomId(widgetId);
|
||||||
const roomInfo = this.getRoom(roomId);
|
const roomInfo = this.getRoom(roomId);
|
||||||
return roomInfo && Object.keys(roomInfo.pinned).filter(k => {
|
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;
|
}).length < 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue