Fix broken patches

This commit is contained in:
Nuckyz 2024-07-10 04:33:03 -03:00
parent 02092a985c
commit 9f8c749421
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
5 changed files with 11 additions and 12 deletions

View file

@ -114,7 +114,7 @@ export default definePlugin({
'("MessageActionCreators")', '("ChannelMessages")', '("MessageActionCreators")', '("ChannelMessages")',
'("Routing/Utils")', '("RTCControlSocket")', '("Routing/Utils")', '("RTCControlSocket")',
'("ConnectionEventFramerateReducer")', '("RTCLatencyTestManager")', '("ConnectionEventFramerateReducer")', '("RTCLatencyTestManager")',
'("OverlayBridgeStore")', '("RPCServer:WSS")' '("OverlayBridgeStore")', '("RPCServer:WSS")', '("RPCServer:IPC")'
].map(logger => ({ ].map(logger => ({
find: logger, find: logger,
predicate: () => settings.store.disableNoisyLoggers, predicate: () => settings.store.disableNoisyLoggers,

View file

@ -34,7 +34,7 @@ import UserPermissions from "./components/UserPermissions";
import { getSortedRoles, sortPermissionOverwrites } from "./utils"; import { getSortedRoles, sortPermissionOverwrites } from "./utils";
const PopoutClasses = findByPropsLazy("container", "scroller", "list"); const PopoutClasses = findByPropsLazy("container", "scroller", "list");
const RoleButtonClasses = findByPropsLazy("button", "buttonInner", "icon", "text"); const RoleButtonClasses = findByPropsLazy("button", "buttonInner", "icon", "banner");
export const enum PermissionsSortOrder { export const enum PermissionsSortOrder {
HighestRole, HighestRole,

View file

@ -37,8 +37,7 @@ import { getCurrentUserInfo, readNotification } from "./reviewDbApi";
import { settings } from "./settings"; import { settings } from "./settings";
import { showToast } from "./utils"; import { showToast } from "./utils";
const PopoutClasses = findByPropsLazy("container", "scroller", "list"); const RoleButtonClasses = findByPropsLazy("button", "buttonInner", "icon", "banner");
const RoleButtonClasses = findByPropsLazy("button", "buttonInner", "icon", "text");
const guildPopoutPatch: NavContextMenuPatchCallback = (children, { guild }: { guild: Guild, onClose(): void; }) => { const guildPopoutPatch: NavContextMenuPatchCallback = (children, { guild }: { guild: Guild, onClose(): void; }) => {
if (!guild) return; if (!guild) return;
@ -181,9 +180,9 @@ export default definePlugin({
onClick={() => openReviewsModal(user.id, user.username)} onClick={() => openReviewsModal(user.id, user.username)}
look={Button.Looks.FILLED} look={Button.Looks.FILLED}
size={Button.Sizes.NONE} size={Button.Sizes.NONE}
color={RoleButtonClasses.color} color={RoleButtonClasses.bannerColor}
className={classes(RoleButtonClasses.button, RoleButtonClasses.banner)} className={classes(RoleButtonClasses.button, RoleButtonClasses.icon, RoleButtonClasses.banner)}
innerClassName={classes(RoleButtonClasses.buttonInner, RoleButtonClasses.banner)} innerClassName={classes(RoleButtonClasses.buttonInner, RoleButtonClasses.icon, RoleButtonClasses.banner)}
> >
<NotesIcon height={16} width={16} /> <NotesIcon height={16} width={16} />
</Button> </Button>

View file

@ -257,7 +257,7 @@ export default definePlugin({
{ {
find: '"alt+shift+down"', find: '"alt+shift+down"',
replacement: { replacement: {
match: /(?<=getChannel\(\i\);return null!=(\i))(?=.{0,150}?>0\)&&\(0,\i\.\i\)\(\i\))/, match: /(?<=getChannel\(\i\);return null!=(\i))(?=.{0,200}?>0\)&&\(0,\i\.\i\)\(\i\))/,
replace: (_, channel) => `&&!$self.isHiddenChannel(${channel})` replace: (_, channel) => `&&!$self.isHiddenChannel(${channel})`
} }
}, },
@ -265,8 +265,8 @@ export default definePlugin({
{ {
find: ".APPLICATION_STORE&&null!=", find: ".APPLICATION_STORE&&null!=",
replacement: { replacement: {
match: /(?<=getState\(\)\.channelId.{0,30}?\(0,\i\.\i\)\(\i\))(?=\.map\()/, match: /getState\(\)\.channelId.+?(?=\.map\(\i=>\i\.id)/,
replace: ".filter(e=>!$self.isHiddenChannel(e))" replace: "$&.filter(e=>!$self.isHiddenChannel(e))"
} }
}, },
{ {

View file

@ -213,8 +213,8 @@ export default definePlugin({
{ {
find: ".canUsePremiumProfileCustomization,{avatarSrc:", find: ".canUsePremiumProfileCustomization,{avatarSrc:",
replacement: { replacement: {
match: /children:\(0,\i\.jsx\)\(\i,{src:(\i)/, match: /\.avatar,\i\.clickable\),onClick:\i,(?<=avatarSrc:(\i).+?)/,
replace: "style:{cursor:\"pointer\"},onClick:()=>{$self.openImage($1)},$&" replace: "$&style:{cursor:\"pointer\"},onClick:()=>{$self.openImage($1)},"
} }
}, },