mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 10:53:33 +00:00
restructure files onto electron-vite boilerplate
This commit is contained in:
parent
91ce2cd8a1
commit
1cf587bc8f
457 changed files with 9927 additions and 11705 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { useEffect, useCallback, useState, useRef } from 'react';
|
||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
|
||||
import { QueueSong, ServerType } from '/@/renderer/api/types';
|
||||
import { useSendScrobble } from '/@/renderer/features/player/mutations/scrobble-mutation';
|
||||
import { usePlayerStore } from '/@/renderer/store';
|
||||
|
|
@ -82,12 +83,12 @@ export const useScrobble = () => {
|
|||
[isScrobbleEnabled, sendScrobble],
|
||||
);
|
||||
|
||||
const progressIntervalId = useRef<ReturnType<typeof setInterval> | null>(null);
|
||||
const songChangeTimeoutId = useRef<ReturnType<typeof setTimeout> | null>(null);
|
||||
const progressIntervalId = useRef<null | ReturnType<typeof setInterval>>(null);
|
||||
const songChangeTimeoutId = useRef<null | ReturnType<typeof setTimeout>>(null);
|
||||
const handleScrobbleFromSongChange = useCallback(
|
||||
(
|
||||
current: (QueueSong | number | undefined)[],
|
||||
previous: (QueueSong | number | undefined)[],
|
||||
current: (number | QueueSong | undefined)[],
|
||||
previous: (number | QueueSong | undefined)[],
|
||||
) => {
|
||||
if (!isScrobbleEnabled) return;
|
||||
|
||||
|
|
@ -179,8 +180,8 @@ export const useScrobble = () => {
|
|||
|
||||
const handleScrobbleFromStatusChange = useCallback(
|
||||
(
|
||||
current: (PlayerStatus | number | undefined)[],
|
||||
previous: (PlayerStatus | number | undefined)[],
|
||||
current: (number | PlayerStatus | undefined)[],
|
||||
previous: (number | PlayerStatus | undefined)[],
|
||||
) => {
|
||||
if (!isScrobbleEnabled) return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue