Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Remove unpin from widget kebab menu #8924

Merged
merged 2 commits into from
Jun 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions src/components/views/context_menus/WidgetContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,6 @@ const WidgetContextMenu: React.FC<IProps> = ({
const pinnedWidgets = WidgetLayoutStore.instance.getContainerWidgets(room, Container.Top);
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;
if (canModify && WidgetUtils.isManagedByManager(app)) {
const _onEditClick = () => {
Expand Down Expand Up @@ -208,7 +198,6 @@ const WidgetContextMenu: React.FC<IProps> = ({
{ snapshotButton }
{ moveLeftButton }
{ moveRightButton }
{ unpinButton }
</IconizedContextMenuOptionList>
</IconizedContextMenu>;
};
Expand Down