mirror of https://github.com/vector-im/riot-web
Remove unbin from widget kebab menu (#8924)
parent
bfbfe59d9d
commit
2bbd542140
|
@ -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>;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue