ServerDrawer: brighter server-name labels, force off the mobile-home-drawer experiment
This commit is contained in:
parent
a01e3177ff
commit
fea13f21ed
3 changed files with 34 additions and 5 deletions
|
|
@ -149,12 +149,16 @@ const st = StyleSheet.create({
|
|||
iconWrap: { width: ICON, height: ICON },
|
||||
icon: { width: ICON, height: ICON, borderRadius: 16, overflow: "hidden" },
|
||||
label: {
|
||||
marginTop: 3,
|
||||
width: ICON + 8,
|
||||
fontSize: 9.5,
|
||||
lineHeight: 11,
|
||||
marginTop: 4,
|
||||
width: ICON + 16,
|
||||
fontSize: 11,
|
||||
lineHeight: 13,
|
||||
fontWeight: "600",
|
||||
textAlign: "center",
|
||||
color: colors?.TEXT_MUTED ?? colors?.HEADER_SECONDARY ?? "#96989d",
|
||||
color: colors?.HEADER_PRIMARY ?? colors?.TEXT_NORMAL ?? "#fff",
|
||||
textShadowColor: "rgba(0,0,0,0.75)",
|
||||
textShadowOffset: { width: 0, height: 1 },
|
||||
textShadowRadius: 2,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ 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";
|
||||
|
|
@ -34,6 +35,7 @@ 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`);
|
||||
},
|
||||
|
|
|
|||
23
plugins/server-drawer/src/patches/disableHomeDrawer.ts
Normal file
23
plugins/server-drawer/src/patches/disableHomeDrawer.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
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