fix SpotifyControls, GameActivityToggle & AccPanelServerProfile (#4059)

This commit is contained in:
Elvy 2026-03-19 09:04:24 +01:00 • committed by GitHub
parent 26829a4204
commit 734412bdf6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 13 additions and 7 deletions

View file

@ -67,11 +67,11 @@ export default definePlugin({
patches: [
{
find: ".WIDGETS_RTC_UPSELL_COACHMARK)",
find: "handleOpenSettingsContextMenu=",
group: true,
replacement: [
{
match: /(\.AVATAR,children:.+?renderPopout:\((\i),\i\)=>){(.+?)}(?=,position)(?<=currentUser:(\i).+?)/,
match: /(\.AVATAR,children:.+?renderPopout:(\i)=>){(.+?)}(?=,position)(?<=currentUser:(\i).+?)/,
replace: (_, rest, popoutProps, originalPopout, currentUser) => `${rest}$self.UserProfile({popoutProps:${popoutProps},currentUser:${currentUser},originalRenderPopout:()=>{${originalPopout}}})`
},
{

View file

@ -87,7 +87,7 @@ export default definePlugin({
},
// Current user area, at bottom of channels/dm list
{
find: ".DISPLAY_NAME_STYLES_COACHMARK),",
find: ".DISPLAY_NAME_STYLES_COACHMARK)",
replacement: [
// Use Decor avatar decoration hook
{

View file

@ -112,7 +112,7 @@ export default definePlugin({
patches: [
{
find: ".DISPLAY_NAME_STYLES_COACHMARK),",
find: ".DISPLAY_NAME_STYLES_COACHMARK)",
replacement: {
match: /children:\[(?=.{0,25}?accountContainerRef)/,
replace: "children:[$self.GameActivityToggleButton(arguments[0]),"

View file

@ -26,7 +26,7 @@ import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
import { Guild } from "@vencord/discord-types";
import { findByCodeLazy, findByPropsLazy, mapMangledModuleLazy } from "@webpack";
import { Menu } from "@webpack/common";
import { Menu, UserStore } from "@webpack/common";
const { updateGuildNotificationSettings } = findByPropsLazy("updateGuildNotificationSettings");
const { toggleShowAllChannels } = mapMangledModuleLazy(".onboardExistingMember(", {
@ -141,5 +141,11 @@ export default definePlugin({
}
],
settings,
applyDefaultSettings
applyDefaultSettings,
flux: {
GUILD_JOIN_REQUEST_UPDATE({ guildId, request, status }) {
if (status === "APPROVED" && request.user_id === UserStore.getCurrentUser().id)
applyDefaultSettings(guildId);
}
}
});

View file

@ -53,7 +53,7 @@ export default definePlugin({
},
patches: [
{
find: ".DISPLAY_NAME_STYLES_COACHMARK),",
find: ".DISPLAY_NAME_STYLES_COACHMARK)",
replacement: {
// react.jsx)(AccountPanel, { ..., showTaglessAccountPanel: blah })
match: /(?<=\i\.jsxs?\)\()(\i),{(?=[^}]*?userTag:\i,occluded:)/,