Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
thororen1234 2026-02-05 18:55:44 -05:00
commit 5f2ce468bc
No known key found for this signature in database
8 changed files with 24 additions and 41 deletions

View file

@ -164,12 +164,10 @@ export default definePlugin({
},
{
find: "RPCServer:WSS",
replacement: [
{
match: /\i\.error\(`Error: \$\{(\i)\.message\}/,
replace: '!$1.message.includes("EADDRINUSE")&&$&'
}
]
replacement: {
match: /\i\.error\(`Error: \$\{(\i)\.message\}/,
replace: '!$1.message.includes("EADDRINUSE")&&$&'
}
},
{
find: "Tried getting Dispatch instance before instantiated",

View file

@ -25,18 +25,20 @@ export default definePlugin({
authors: [Devs.Nuckyz],
patches: [
{
find: "#{intl::BOT_CALL_IDLE_DISCONNECT_2}",
find: "this.idleTimeout.start(",
replacement: {
match: /,?(?=\i\(this,"idleTimeout",new \i\.\i\))/,
replace: ";return;"
match: /this\.idleTimeout\.(start|stop)/g,
replace: "$self.noop"
}
},
{
find: "handleIdleUpdate(){",
replacement: {
match: /(?<=_initialize\(\){)/,
replace: "return;"
match: "handleIdleUpdate(){",
replace: "handleIdleUpdate(){return;"
}
}
]
],
noop() { }
});

View file

@ -52,12 +52,10 @@ export default definePlugin({
patches: [{
// HEY THOR UPDATE SHOW ME YOUR NAME IF THIS SHIT CHANGES TY :)
find: ".USER_MENTION)",
replacement: [
{
match: /children:`@\$\{(\i\?\?\i)\}`(?<=\.useName\((\i)\).+?)/,
replace: "children:$self.renderUsername({username:$1,user:$2,showMeYourNameMention:typeof showMeYourNameMention!=='undefined'?showMeYourNameMention:undefined})"
}
]
replacement: {
match: /children:`@\$\{(\i\?\?\i)\}`(?<=\.useName\((\i)\).+?)/,
replace: "children:$self.renderUsername({username:$1,user:$2,showMeYourNameMention:typeof showMeYourNameMention!=='undefined'?showMeYourNameMention:undefined})"
}
},
{
find: ".ROLE_MENTION)",

View file

@ -26,8 +26,7 @@ interface ColorPickerWithSwatchesProps {
const ColorPickerWithSwatches = findComponentByCodeLazy<ColorPickerWithSwatchesProps>('id:"color-picker"');
// 701663 this is terrible imo
export const requireSettingsMenu = extractAndLoadChunksLazy(['"AppSkeleton"'], /createPromise:.{0,20}(\i\.\i\("?.+?"?\).*?).then\(\i\.bind\(\i,"?(.+?)"?\)\).{0,50}\}\),(?=.{0,15}createPromise.*?\}\),)/);
export const requireSettingsModal = extractAndLoadChunksLazy(['type:"USER_SETTINGS_MODAL_OPEN"']);
const cl = classNameFactory("vc-pindms-modal-");
@ -122,6 +121,6 @@ export function NewCategoryModal({ categoryId, modalProps, initialChannelId }: P
export const openCategoryModal = (categoryId: string | null, channelId: string | null) =>
openModalLazy(async () => {
await requireSettingsMenu();
await requireSettingsModal();
return modalProps => <NewCategoryModal categoryId={categoryId} modalProps={modalProps} initialChannelId={channelId} />;
});

View file

@ -16,11 +16,6 @@ export interface Category {
collapsed?: boolean;
}
const CATEGORY_BASE_KEY = "PinDMsCategories-";
const CATEGORY_MIGRATED_PINDMS_KEY = "PinDMsMigratedPinDMs";
const CATEGORY_MIGRATED_KEY = "PinDMsMigratedOldCategories";
const OLD_CATEGORY_KEY = "BetterPinDMsCategories-";
let forceUpdateDms: (() => void) | undefined = undefined;
export let currentUserCategories: Category[] = [];

View file

@ -16,7 +16,7 @@ import { findCssClassesLazy, findStoreLazy } from "@webpack";
import { Clickable, ContextMenuApi, FluxDispatcher, Menu, React } from "@webpack/common";
import { contextMenus } from "./components/contextMenu";
import { openCategoryModal, requireSettingsMenu } from "./components/CreateCategoryModal";
import { openCategoryModal, requireSettingsModal } from "./components/CreateCategoryModal";
import { DEFAULT_CHUNK_SIZE } from "./constants";
import { canMoveCategory, canMoveCategoryInDirection, Category, categoryLen, collapseCategory, getAllUncollapsedChannels, getCategoryByIndex, getSections, init, isPinned, moveCategory, removeCategory, usePinnedDms } from "./data";
@ -173,7 +173,7 @@ export default definePlugin({
categoryLen,
getSections,
getAllUncollapsedChannels,
requireSettingsMenu,
requireSettingsMenu: requireSettingsModal,
makeProps(instance, { sections }: { sections: number[]; }) {
this._instance = instance;

View file

@ -352,13 +352,6 @@ export default definePlugin({
match: /\i>0(?=&&!\i&&!\i)/,
replace: m => `($self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)?true:${m})`
},
{
// Show only the plus text without overflowed children amount
// if the overflow amount is <= 0 and the component is used inside the HiddenChannelLockScreen
match: /(?<=`\+\$\{)\i(?=\})/,
replace: overflowTextAmount => "" +
`$self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)&&(${overflowTextAmount}-1)<=0?"":${overflowTextAmount}`
},
{
// Show only the plus text without overflowed children amount
// if the overflow amount is <= 0 and the component is used inside the HiddenChannelLockScreen

View file

@ -205,12 +205,10 @@ export default definePlugin({
// Banners
{
find: 'backgroundColor:"COMPLETE"',
replacement: [
{
match: /(overflow:"visible",.{0,125}?!1\),)style:{(?=.+?backgroundImage:null!=(\i)\?`url\(\$\{\2\}\))/,
replace: (_, rest, bannerSrc) => `${rest}onClick:()=>${bannerSrc}!=null&&$self.openBanner(${bannerSrc}),style:{cursor:${bannerSrc}!=null?"pointer":void 0,`
}
]
replacement: {
match: /(overflow:"visible",.{0,125}?!1\),)style:{(?=.+?backgroundImage:null!=(\i)\?`url\(\$\{\2\}\))/,
replace: (_, rest, bannerSrc) => `${rest}onClick:()=>${bannerSrc}!=null&&$self.openBanner(${bannerSrc}),style:{cursor:${bannerSrc}!=null?"pointer":void 0,`
}
},
// Group DMs top small & large icon
{