ShowHiddenChannels: Fix crashing on canary

main
V 1 year ago
parent 232e340fab
commit cd2cbfa0ef
No known key found for this signature in database
GPG Key ID: A1DC0CFB5615D905

@ -29,7 +29,7 @@ import type { Channel, Role } from "discord-types/general";
import HiddenChannelLockScreen, { setChannelBeginHeaderComponent } from "./components/HiddenChannelLockScreen"; import HiddenChannelLockScreen, { setChannelBeginHeaderComponent } from "./components/HiddenChannelLockScreen";
const ChannelListClasses = findByPropsLazy("channelName", "subtitle", "modeMuted", "iconContainer"); const ChannelListClasses = findByPropsLazy("channelEmoji", "unread", "icon");
export const VIEW_CHANNEL = 1n << 10n; export const VIEW_CHANNEL = 1n << 10n;
const CONNECT = 1n << 20n; const CONNECT = 1n << 20n;
@ -472,7 +472,7 @@ export default definePlugin({
HiddenChannelLockScreen: (channel: any) => <HiddenChannelLockScreen channel={channel} />, HiddenChannelLockScreen: (channel: any) => <HiddenChannelLockScreen channel={channel} />,
LockIcon: () => ( LockIcon: ErrorBoundary.wrap(() => (
<svg <svg
className={ChannelListClasses.icon} className={ChannelListClasses.icon}
height="18" height="18"
@ -483,7 +483,7 @@ export default definePlugin({
> >
<path className="shc-evenodd-fill-current-color" d="M17 11V7C17 4.243 14.756 2 12 2C9.242 2 7 4.243 7 7V11C5.897 11 5 11.896 5 13V20C5 21.103 5.897 22 7 22H17C18.103 22 19 21.103 19 20V13C19 11.896 18.103 11 17 11ZM12 18C11.172 18 10.5 17.328 10.5 16.5C10.5 15.672 11.172 15 12 15C12.828 15 13.5 15.672 13.5 16.5C13.5 17.328 12.828 18 12 18ZM15 11H9V7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V11Z" /> <path className="shc-evenodd-fill-current-color" d="M17 11V7C17 4.243 14.756 2 12 2C9.242 2 7 4.243 7 7V11C5.897 11 5 11.896 5 13V20C5 21.103 5.897 22 7 22H17C18.103 22 19 21.103 19 20V13C19 11.896 18.103 11 17 11ZM12 18C11.172 18 10.5 17.328 10.5 16.5C10.5 15.672 11.172 15 12 15C12.828 15 13.5 15.672 13.5 16.5C13.5 17.328 12.828 18 12 18ZM15 11H9V7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V11Z" />
</svg> </svg>
), ), { noop: true }),
HiddenChannelIcon: ErrorBoundary.wrap(() => ( HiddenChannelIcon: ErrorBoundary.wrap(() => (
<Tooltip text="Hidden Channel"> <Tooltip text="Hidden Channel">

Loading…
Cancel
Save