aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/pinDms/contextMenus.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/pinDms/contextMenus.tsx')
-rw-r--r--src/plugins/pinDms/contextMenus.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/pinDms/contextMenus.tsx b/src/plugins/pinDms/contextMenus.tsx
index d75c9f9..7d89ec1 100644
--- a/src/plugins/pinDms/contextMenus.tsx
+++ b/src/plugins/pinDms/contextMenus.tsx
@@ -19,10 +19,11 @@
import { addContextMenuPatch, findGroupChildrenByChildId, NavContextMenuPatchCallback, removeContextMenuPatch } from "@api/ContextMenu";
import { Menu } from "@webpack/common";
-import { isPinned, movePin, snapshotArray, togglePin } from "./settings";
+import { isPinned, movePin, PinOrder, settings, snapshotArray, togglePin } from "./settings";
function PinMenuItem(channelId: string) {
const pinned = isPinned(channelId);
+ const canMove = pinned && settings.store.pinOrder === PinOrder.Custom;
return (
<>
@@ -31,14 +32,14 @@ function PinMenuItem(channelId: string) {
label={pinned ? "Unpin DM" : "Pin DM"}
action={() => togglePin(channelId)}
/>
- {pinned && snapshotArray[0] !== channelId && (
+ {canMove && snapshotArray[0] !== channelId && (
<Menu.MenuItem
id="move-pin-up"
label="Move Pin Up"
action={() => movePin(channelId, -1)}
/>
)}
- {pinned && snapshotArray[snapshotArray.length - 1] !== channelId && (
+ {canMove && snapshotArray[snapshotArray.length - 1] !== channelId && (
<Menu.MenuItem
id="move-pin-down"
label="Move Pin Down"