From ec091a79591cf9619dd589102f5b338827b70ad8 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Fri, 19 May 2023 21:24:56 -0300 Subject: Fix SHC broken patches; Sort PermViewer channel overwrites roles (#1166) --- .../showHiddenChannels/components/HiddenChannelLockScreen.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx') diff --git a/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx b/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx index 506fbe7..d01efec 100644 --- a/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx +++ b/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx @@ -26,6 +26,7 @@ import type { Channel } from "discord-types/general"; import type { ComponentType } from "react"; import openRolesAndUsersPermissionsModal, { PermissionType, RoleOrUserPermission } from "../../permissionsViewer/components/RolesAndUsersPermissions"; +import { sortPermissionOverwrites } from "../../permissionsViewer/utils"; import { settings, VIEW_CHANNEL } from ".."; enum SortOrderTypes { @@ -169,12 +170,12 @@ function HiddenChannelLockScreen({ channel }: { channel: ExtendedChannel; }) { } if (Settings.plugins.PermissionsViewer.enabled) { - setPermissions(Object.values(permissionOverwrites).map(overwrite => ({ + setPermissions(sortPermissionOverwrites(Object.values(permissionOverwrites).map(overwrite => ({ type: overwrite.type as PermissionType, id: overwrite.id, overwriteAllow: overwrite.allow, overwriteDeny: overwrite.deny - }))); + })), guild_id)); } }, [channelId]); -- cgit