From 223b0366c642b4b96ace140680565711886414b1 Mon Sep 17 00:00:00 2001 From: Rini Date: Tue, 5 Sep 2023 18:51:22 +0000 Subject: [PATCH] pinDMs: fix alt+shift+up (#25) applies the same fix as alt+up/down to the jump to unread one confirmed non-explosion of shc Reviewed-on: https://codeberg.org/Ven/cord/pulls/25 Co-authored-by: Rini Co-committed-by: Rini --- src/plugins/pinDms/index.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/plugins/pinDms/index.tsx b/src/plugins/pinDms/index.tsx index 249dcd27..02fe332d 100644 --- a/src/plugins/pinDms/index.tsx +++ b/src/plugins/pinDms/index.tsx @@ -122,6 +122,14 @@ export default definePlugin({ // ....concat(pins).concat(toArray(channelIds).filter(c => !isPinned(c))) replace: ".concat($self.getSnapshot()).concat($2.filter(c=>!$self.isPinned(c)))" } - } + }, + // fix alt+shift+up/down + { + find: '"alt+shift+down"', + replacement: { + match: /(?<=return \i===\i\.ME\?)\i\.\i\.getPrivateChannelIds\(\)/, + replace: "$self.getSnapshot().concat($&.filter(c=>!$self.isPinned(c)))" + } + }, ] });