fix SpotifyControls, GameActivityToggle & AccPanelServerProfile (#4059)
This commit is contained in:
parent
26829a4204
commit
734412bdf6
5 changed files with 13 additions and 7 deletions
|
|
@ -67,11 +67,11 @@ export default definePlugin({
|
||||||
|
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: ".WIDGETS_RTC_UPSELL_COACHMARK)",
|
find: "handleOpenSettingsContextMenu=",
|
||||||
group: true,
|
group: true,
|
||||||
replacement: [
|
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}}})`
|
replace: (_, rest, popoutProps, originalPopout, currentUser) => `${rest}$self.UserProfile({popoutProps:${popoutProps},currentUser:${currentUser},originalRenderPopout:()=>{${originalPopout}}})`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
// Current user area, at bottom of channels/dm list
|
// Current user area, at bottom of channels/dm list
|
||||||
{
|
{
|
||||||
find: ".DISPLAY_NAME_STYLES_COACHMARK),",
|
find: ".DISPLAY_NAME_STYLES_COACHMARK)",
|
||||||
replacement: [
|
replacement: [
|
||||||
// Use Decor avatar decoration hook
|
// Use Decor avatar decoration hook
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ export default definePlugin({
|
||||||
|
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: ".DISPLAY_NAME_STYLES_COACHMARK),",
|
find: ".DISPLAY_NAME_STYLES_COACHMARK)",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /children:\[(?=.{0,25}?accountContainerRef)/,
|
match: /children:\[(?=.{0,25}?accountContainerRef)/,
|
||||||
replace: "children:[$self.GameActivityToggleButton(arguments[0]),"
|
replace: "children:[$self.GameActivityToggleButton(arguments[0]),"
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ import { Devs } from "@utils/constants";
|
||||||
import definePlugin, { OptionType } from "@utils/types";
|
import definePlugin, { OptionType } from "@utils/types";
|
||||||
import { Guild } from "@vencord/discord-types";
|
import { Guild } from "@vencord/discord-types";
|
||||||
import { findByCodeLazy, findByPropsLazy, mapMangledModuleLazy } from "@webpack";
|
import { findByCodeLazy, findByPropsLazy, mapMangledModuleLazy } from "@webpack";
|
||||||
import { Menu } from "@webpack/common";
|
import { Menu, UserStore } from "@webpack/common";
|
||||||
|
|
||||||
const { updateGuildNotificationSettings } = findByPropsLazy("updateGuildNotificationSettings");
|
const { updateGuildNotificationSettings } = findByPropsLazy("updateGuildNotificationSettings");
|
||||||
const { toggleShowAllChannels } = mapMangledModuleLazy(".onboardExistingMember(", {
|
const { toggleShowAllChannels } = mapMangledModuleLazy(".onboardExistingMember(", {
|
||||||
|
|
@ -141,5 +141,11 @@ export default definePlugin({
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
settings,
|
settings,
|
||||||
applyDefaultSettings
|
applyDefaultSettings,
|
||||||
|
flux: {
|
||||||
|
GUILD_JOIN_REQUEST_UPDATE({ guildId, request, status }) {
|
||||||
|
if (status === "APPROVED" && request.user_id === UserStore.getCurrentUser().id)
|
||||||
|
applyDefaultSettings(guildId);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: ".DISPLAY_NAME_STYLES_COACHMARK),",
|
find: ".DISPLAY_NAME_STYLES_COACHMARK)",
|
||||||
replacement: {
|
replacement: {
|
||||||
// react.jsx)(AccountPanel, { ..., showTaglessAccountPanel: blah })
|
// react.jsx)(AccountPanel, { ..., showTaglessAccountPanel: blah })
|
||||||
match: /(?<=\i\.jsxs?\)\()(\i),{(?=[^}]*?userTag:\i,occluded:)/,
|
match: /(?<=\i\.jsxs?\)\()(\i),{(?=[^}]*?userTag:\i,occluded:)/,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue