ServerDrawer: revert the mobile-home-drawer experiment patch, it crashes
This commit is contained in:
parent
fea13f21ed
commit
9d118daf38
2 changed files with 0 additions and 25 deletions
|
|
@ -4,7 +4,6 @@ import { patchMobileQuestDock } from "./patches/mobileQuestDock";
|
|||
import { patchGetQuestAsset } from "./patches/getQuestAsset";
|
||||
import { patchExpanded, patchEmpty } from "./patches/contentPatch";
|
||||
import { patchHideGuildsBar } from "./patches/hideGuildsBar";
|
||||
import { patchDisableHomeDrawer } from "./patches/disableHomeDrawer";
|
||||
import { patchCreateElement } from "./patches/createElementIntercept";
|
||||
import { storage } from "@vendetta/plugin";
|
||||
import Settings from "./ui/Settings";
|
||||
|
|
@ -35,7 +34,6 @@ export default {
|
|||
if (patchEmpty("QuestDockEnrolledBody", cleanups)) patched++;
|
||||
if (patchEmpty("QuestDockUnenrolledBody", cleanups)) patched++;
|
||||
if (patchHideGuildsBar(cleanups)) patched++;
|
||||
if (patchDisableHomeDrawer(cleanups)) patched++;
|
||||
|
||||
console.log(TAG, `onLoad done — ${patched} patches applied, ${cleanups.length} cleanups`);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
import { findByProps } from "@vendetta/metro";
|
||||
|
||||
const TAG = "[ServerDrawer]";
|
||||
|
||||
// Discord's own "2025-10-mobile-home-drawer" experiment: one bucket (landOnHome) force-opens
|
||||
// a native drawer panel on boot, sliding all content right and exposing whatever normally sits
|
||||
// behind it - including the guild bar we already hid, but in a spot our own patch never reaches
|
||||
// since it's a separate reveal, not the guild bar's usual mount. Forcing the control config off
|
||||
// keeps content pinned in place so nothing gets revealed in the first place.
|
||||
const DISABLED_CONFIG = { enableHome: false, landOnHome: false, enablePeekHint: false };
|
||||
|
||||
export function patchDisableHomeDrawer(cleanups: (() => void)[]): boolean {
|
||||
const exp = findByProps("MobileHomeDrawerExperiment")?.MobileHomeDrawerExperiment;
|
||||
if (!exp?.useConfig) {
|
||||
console.log(TAG, "WARN: MobileHomeDrawerExperiment not found");
|
||||
return false;
|
||||
}
|
||||
const orig = exp.useConfig;
|
||||
exp.useConfig = () => DISABLED_CONFIG;
|
||||
cleanups.push(() => { exp.useConfig = orig; });
|
||||
console.log(TAG, "PATCH: MobileHomeDrawerExperiment forced off");
|
||||
return true;
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue