mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
Refactor settings store and components
This commit is contained in:
parent
373441e4c6
commit
eecbcddea3
30 changed files with 894 additions and 832 deletions
|
|
@ -25,7 +25,7 @@ const mpris = isElectron() && utils?.isLinux() ? window.electron.mpris : null;
|
|||
export const useCenterControls = (args: { playersRef: any }) => {
|
||||
const { playersRef } = args;
|
||||
|
||||
const settings = useSettingsStore((state) => state.player);
|
||||
const settings = useSettingsStore((state) => state.playback);
|
||||
const currentPlayer = useCurrentPlayer();
|
||||
const { setShuffle, setRepeat, play, pause, previous, next, setCurrentIndex, autoNext } =
|
||||
usePlayerControls();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { useEffect, useCallback, useState, useRef } from 'react';
|
|||
import { QueueSong, ServerType } from '/@/renderer/api/types';
|
||||
import { useSendScrobble } from '/@/renderer/features/player/mutations/scrobble-mutation';
|
||||
import { useCurrentStatus, usePlayerStore } from '/@/renderer/store';
|
||||
import { usePlayerSettings } from '/@/renderer/store/settings.store';
|
||||
import { usePlaybackSettings } from '/@/renderer/store/settings.store';
|
||||
import { PlayerStatus } from '/@/renderer/types';
|
||||
|
||||
/*
|
||||
|
|
@ -49,7 +49,7 @@ const checkScrobbleConditions = (args: {
|
|||
|
||||
export const useScrobble = () => {
|
||||
const status = useCurrentStatus();
|
||||
const scrobbleSettings = usePlayerSettings().scrobble;
|
||||
const scrobbleSettings = usePlaybackSettings().scrobble;
|
||||
const isScrobbleEnabled = scrobbleSettings?.enabled;
|
||||
const sendScrobble = useSendScrobble();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue