Skip to content

Commit

Permalink
Fix AvatarSettingsButton blank page
Browse files Browse the repository at this point in the history
  • Loading branch information
Neodymium7 committed Dec 3, 2024
1 parent 29d5520 commit 1a06f01
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions AvatarSettingsButton/src/modules/discordmodules.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ export const UserSettingsWindow: any = expectModule({
});

export const Sections = expectModule({
filter: byKeys("ACCOUNT", "ACCESSIBILITY"),
filter: byKeys("ACCOUNT", "CHANGE_LOG"),
searchExports: true,
name: "Sections",
fallback: { ACCOUNT: "Account" },
fallback: { ACCOUNT: "My Account" },
});

console.log(Sections);

export const accountClasses = expectModule<AccountClasses>(byKeys("buildOverrideButton"), {
name: "Account Classes",
fatal: true,
Expand Down
4 changes: 2 additions & 2 deletions AvatarSettingsButton/src/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "AvatarSettingsButton",
"author": "Neodymium",
"version": "2.1.5",
"version": "2.1.6",
"description": "Moves the User Settings button to left clicking on the user avatar, with the status picker and context menu still available on configurable actions.",
"source": "https://github.com/Neodymium7/BetterDiscordStuff/blob/main/AvatarSettingsButton/AvatarSettingsButton.plugin.js",
"invite": "fRbsqH87Av",
Expand All @@ -13,7 +13,7 @@
{
"title": "Fixed",
"type": "fixed",
"items": ["Fixed plugin not working after Discord's string changes."]
"items": ["Fixed opening blank settings page."]
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion VoiceActivity/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default class VoiceActivity extends BasePlugin {
const GuildIconComponent = targetInstance?.elementType;
if (!GuildIconComponent) return Logger.error("Guild icon component not found");
Patcher.before(GuildIconComponent, "type", (_, [props]: [any]) => {
if (!props.guild) return;
if (!props?.guild) return;

const { showGuildIcons, ignoredGuilds, ignoredChannels } = Settings.useSettingsState();
const mediaState = useStateFromStores([Stores.VoiceStateStore], () =>
Expand Down

0 comments on commit 1a06f01

Please sign in to comment.