aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/showHiddenChannels/components
diff options
context:
space:
mode:
authorNuckyz <61953774+Nuckyz@users.noreply.github.com>2023-05-19 21:24:56 -0300
committerGitHub <noreply@github.com>2023-05-20 02:24:56 +0200
commitec091a79591cf9619dd589102f5b338827b70ad8 (patch)
treebbb7f56689a4ef399d5ef67cfda68d6f97a2b1db /src/plugins/showHiddenChannels/components
parent89a6c575c9cfe6a6fa72def404220817e008cfea (diff)
downloadVencord-ec091a79591cf9619dd589102f5b338827b70ad8.tar.gz
Vencord-ec091a79591cf9619dd589102f5b338827b70ad8.tar.bz2
Vencord-ec091a79591cf9619dd589102f5b338827b70ad8.zip
Fix SHC broken patches; Sort PermViewer channel overwrites roles (#1166)
Diffstat (limited to 'src/plugins/showHiddenChannels/components')
-rw-r--r--src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx5
1 files changed, 3 insertions, 2 deletions
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]);