From 1a33639aa1644c90e51735464bdfd4cc7807ed83 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Mon, 29 Jul 2024 19:02:49 -0400 Subject: [PATCH] IF ELSE HELL BABY!!!!!!!!!! --- src/plugins/serverListIndicators/index.tsx | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/plugins/serverListIndicators/index.tsx b/src/plugins/serverListIndicators/index.tsx index de16f9448..894ae1132 100644 --- a/src/plugins/serverListIndicators/index.tsx +++ b/src/plugins/serverListIndicators/index.tsx @@ -127,17 +127,14 @@ export default definePlugin({ renderIndicator: () => { const { mode } = Settings.plugins.ServerListIndicators; - let text: string = `${onlineFriends} Friends, ${guildCount} Servers`; - switch (mode) { - case (!!(mode & IndicatorType.FRIEND)): - text = `${onlineFriends} Friends`; - break; - case (!!(mode & IndicatorType.SERVER)): - text = `${guildCount} Servers`; - break; - case (!!(mode & IndicatorType.FRIEND)) && (!!(mode & IndicatorType.SERVER)): - text = `${onlineFriends} Friends, ${guildCount} Servers`; - break; + let text: string; + + if (!!(mode & IndicatorType.FRIEND) && !!(mode & IndicatorType.SERVER)) { + text = `${onlineFriends} Friends, ${guildCount} Servers`; + } else if (!!(mode & IndicatorType.FRIEND)) { + text = `${onlineFriends} Friends`; + } else if (!!(mode & IndicatorType.SERVER)) { + text = `${guildCount} Servers`; } return