Skip to content

Commit

Permalink
style: setters ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
duzda committed Aug 15, 2024
1 parent f4167ed commit b040628
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/view/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ import { Setters } from '../common/types/settings';
import { setVolumePower } from './injections/volume';

const OnSet: Setters = {
enableTray: () => {},
closeToTray: () => {},
deemixIntegration: () => {},
discordRPC: () => {},
enableTray: () => {},
volumePower: (newValue: number) => setVolumePower(newValue),
discordRPC: () => {},
};

export const initializeSettings = async () => {
const settings = await window.view.settingsAPI.getSettings();

OnSet.enableTray(settings.enableTray);
OnSet.closeToTray(settings.closeToTray);
OnSet.deemixIntegration(settings.deemixIntegration);
OnSet.discordRPC(settings.discordRPC);
OnSet.enableTray(settings.enableTray);
OnSet.volumePower(settings.volumePower);
OnSet.discordRPC(settings.discordRPC);

window.view.settingsAPI.onSetProperty((key: string, value: unknown) => {
if (key in OnSet) {
Expand Down

0 comments on commit b040628

Please sign in to comment.