IF ELSE HELL BABY!!!!!!!!!!

This commit is contained in:
thororen1234 2024-07-29 19:02:49 -04:00
parent 2a6079e9e3
commit 1a33639aa1

View file

@ -127,17 +127,14 @@ export default definePlugin({
renderIndicator: () => { renderIndicator: () => {
const { mode } = Settings.plugins.ServerListIndicators; const { mode } = Settings.plugins.ServerListIndicators;
let text: string = `${onlineFriends} Friends, ${guildCount} Servers`; let text: string;
switch (mode) {
case (!!(mode & IndicatorType.FRIEND)): if (!!(mode & IndicatorType.FRIEND) && !!(mode & IndicatorType.SERVER)) {
text = `${onlineFriends} Friends`;
break;
case (!!(mode & IndicatorType.SERVER)):
text = `${guildCount} Servers`;
break;
case (!!(mode & IndicatorType.FRIEND)) && (!!(mode & IndicatorType.SERVER)):
text = `${onlineFriends} Friends, ${guildCount} Servers`; text = `${onlineFriends} Friends, ${guildCount} Servers`;
break; } else if (!!(mode & IndicatorType.FRIEND)) {
text = `${onlineFriends} Friends`;
} else if (!!(mode & IndicatorType.SERVER)) {
text = `${guildCount} Servers`;
} }
return <ErrorBoundary noop> return <ErrorBoundary noop>