Remove unbin from widget kebab menu (#8924)

This commit is contained in:
Michael Weimann 2022-06-29 15:30:44 +02:00 committed by GitHub
parent bfbfe59d9d
commit 2bbd542140
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,16 +85,6 @@ const WidgetContextMenu: React.FC<IProps> = ({
const pinnedWidgets = WidgetLayoutStore.instance.getContainerWidgets(room, Container.Top); const pinnedWidgets = WidgetLayoutStore.instance.getContainerWidgets(room, Container.Top);
const widgetIndex = pinnedWidgets.findIndex(widget => widget.id === app.id); const widgetIndex = pinnedWidgets.findIndex(widget => widget.id === app.id);
let unpinButton;
if (showUnpin && widgetIndex >= 0) {
const onUnpinClick = () => {
WidgetLayoutStore.instance.moveToContainer(room, app, Container.Right);
onFinished();
};
unpinButton = <IconizedContextMenuOption onClick={onUnpinClick} label={_t("Unpin")} />;
}
let editButton; let editButton;
if (canModify && WidgetUtils.isManagedByManager(app)) { if (canModify && WidgetUtils.isManagedByManager(app)) {
const _onEditClick = () => { const _onEditClick = () => {
@ -208,7 +198,6 @@ const WidgetContextMenu: React.FC<IProps> = ({
{ snapshotButton } { snapshotButton }
{ moveLeftButton } { moveLeftButton }
{ moveRightButton } { moveRightButton }
{ unpinButton }
</IconizedContextMenuOptionList> </IconizedContextMenuOptionList>
</IconizedContextMenu>; </IconizedContextMenu>;
}; };