optimize settings store

This commit is contained in:
jeffvli
2026-01-02 03:13:17 -08:00
parent 0cfc4119ba
commit a66c67e86d
72 changed files with 479 additions and 354 deletions
@@ -25,7 +25,8 @@ import {
} from '/@/renderer/store';
import {
SidebarItemType,
useGeneralSettings,
useSidebarItems,
useSidebarPlaylistList,
useWindowSettings,
} from '/@/renderer/store/settings.store';
import { Accordion } from '/@/shared/components/accordion/accordion';
@@ -41,7 +42,7 @@ import { Platform } from '/@/shared/types/types';
export const Sidebar = () => {
const { t } = useTranslation();
const { sidebarPlaylistList } = useGeneralSettings();
const sidebarPlaylistList = useSidebarPlaylistList();
const translatedSidebarItemMap = useMemo(
() => ({
@@ -62,7 +63,7 @@ export const Sidebar = () => {
[t],
);
const { sidebarItems } = useGeneralSettings();
const sidebarItems = useSidebarItems();
const { windowBarStyle } = useWindowSettings();
const sidebarImageEnabled = useAppStore((state) => state.sidebar.image);
const isRadioPlaying = useRadioStore((state) => state.isPlaying);