diff --git a/plugins/radial-status/src/index.ts b/plugins/radial-status/src/index.ts index e53d522..37f68f3 100644 --- a/plugins/radial-status/src/index.ts +++ b/plugins/radial-status/src/index.ts @@ -8,10 +8,10 @@ let unpatchAll: () => void = () => {}; export default { onLoad: () => { - // Off by default - see the note in patches/ringPatch.ts. Confirmed on-device to corrupt - // member list rows and the profile status indicator, and to never match YouBar's own - // indicator at all - being re-diagnosed properly before this defaults back on. - storage.enabled ??= false; + // Re-enabled by default - see the note in patches/ringPatch.ts. The earlier corruption came + // from this repo's own broadened wrapper-size match, not upstream's original narrow one, + // which is confirmed working live on Revenge as-is. + storage.enabled ??= true; storage.colors ??= { online: "#23A55A", idle: "#F0B232", diff --git a/plugins/radial-status/src/patches/ringPatch.ts b/plugins/radial-status/src/patches/ringPatch.ts index 95dd4fe..0e9cbf4 100644 --- a/plugins/radial-status/src/patches/ringPatch.ts +++ b/plugins/radial-status/src/patches/ringPatch.ts @@ -3,35 +3,25 @@ import { before } from "@vendetta/patcher"; import { storage } from "@vendetta/plugin"; /** - * Forked from AngelW0lf's Radial Status (BSD-3-Clause, see LICENSE). The upstream original matched - * one hardcoded wrapper size (exactly 32x32, borderRadius 16) - generalized here to any square, - * fully-circular wrapper (borderRadius === width / 2) instead, since avatar sizes differ across - * member lists, DM lists, and profile popouts, and the two structural checks right below (a `user` - * prop with a string id, a `status` prop) already confirm this is the right element regardless of - * its exact pixel size. - * - * Not independently re-verified against a live decompiled build the way the rest of this repo's - * fixes are - this is a straight-line adaptation of upstream's own (previously working, per its - * changelog) logic. Every assumption below is guarded, so a shape mismatch just means the ring - * doesn't draw for that avatar, not a crash. + * Forked from AngelW0lf's Radial Status (BSD-3-Clause, see LICENSE). This repo's own first attempt + * "generalized" upstream's exact wrapper-size check (32x32, borderRadius 16) to any square, + * fully-circular wrapper, on the theory that avatar sizes differ across contexts - that broadened + * match turned out to false-positive on unrelated Views (confirmed on-device: it visibly corrupted + * member list rows and the profile status indicator, and never matched YouBar's own indicator at + * all). The user was separately running upstream's own unmodified build live on Revenge with none + * of those problems, which means the narrow exact-size check was never the issue - reverted to it + * here instead of the broadened guess. */ export default function patchRing(): () => void { if (!General?.View) return () => {}; return before("render", General.View, (args: any[]) => { try { - // Off by default - the broadened circle match below turned out to false-positive on - // unrelated Views in the member list (confirmed by on-device testing: it visibly - // corrupted member list rows and the profile status indicator, and never matched - // YouBar's own indicator at all), so this no longer runs unless explicitly turned on - // while it's being properly re-diagnosed with live capture data. - if (!storage.enabled) return; - const [wrapper] = args; if (!wrapper || !Array.isArray(wrapper.style)) return; const circleIdx = wrapper.style.findIndex( - (s: any) => s && typeof s.width === "number" && s.width === s.height && s.borderRadius === s.width / 2 + (s: any) => s && s.width === 32 && s.height === 32 && s.borderRadius === 16 ); if (circleIdx === -1) return; diff --git a/plugins/radial-status/src/ui/Settings.tsx b/plugins/radial-status/src/ui/Settings.tsx index d0075f8..545f05b 100644 --- a/plugins/radial-status/src/ui/Settings.tsx +++ b/plugins/radial-status/src/ui/Settings.tsx @@ -36,14 +36,12 @@ export default function Settings() { return ( - Off by default right now - the current matching logic was confirmed to corrupt member - list rows and the profile status indicator, and to miss YouBar's own indicator - entirely. Being properly re-diagnosed; only turn this on if you're helping test it. + Replaces the small presence dot on an avatar with a colored ring instead, per status + below. Leave a status blank to keep showing the normal dot for it. { storage.enabled = v; }} /> diff --git a/site/meta.json b/site/meta.json index 961217a..3dc3968 100644 --- a/site/meta.json +++ b/site/meta.json @@ -4,7 +4,7 @@ "status": "revived", "accent": "#23A55A", "tagline": "A colored ring around the avatar instead of a presence dot - similar to Platform Indicator, but for status.", - "note": "Fork of AngelW0lf's Radial Status (BSD-3-Clause, see LICENSE). Upstream had a phone-home mechanism - it fetched a remote blacklist on every load and could silently uninstall itself for specific user IDs the original author chose - dropped entirely here, no network requests at all. Upstream also matched one hardcoded wrapper size (32x32 only); generalized here to any fully-circular avatar wrapper, since avatar sizes differ across member lists, DM lists, and profile popouts. Upstream's settings screen had commented-out, non-functional size/thickness inputs and an unfinished joke placeholder button - both removed, with real working size and thickness controls in their place.", + "note": "Fork of AngelW0lf's Radial Status (BSD-3-Clause, see LICENSE). Upstream had a phone-home mechanism - it fetched a remote blacklist on every load and could silently uninstall itself for specific user IDs the original author chose - dropped entirely here, no network requests at all. An early revision of this fork also generalized upstream's exact wrapper-size match to any fully-circular avatar wrapper, on the theory that avatar sizes differ across contexts - that broadened match turned out to false-positive on unrelated elements (confirmed on-device: corrupted member list rows and the profile status indicator), while upstream's own narrow, exact-size check was confirmed working live on Revenge as-is. Reverted to that exact match. Upstream's settings screen had commented-out, non-functional size/thickness inputs and an unfinished joke placeholder button - both removed, with real working size and thickness controls in their place.", "howItWorks": "Hides the small colored dot Discord shows on an avatar for online/idle/DND, and draws a colored ring around the whole avatar instead - similar in spirit to a platform indicator, but for presence status. Each status's color is configurable, along with the ring's size multiplier and thickness. A status left with no color configured just keeps showing the normal dot.", "features": [ "Colored ring around the avatar instead of the small presence dot",