kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
				
				
				
			fix: #2053
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2346>environments/review-docs-fix-d-jlladr/deployments/17321
							rodzic
							
								
									49be19c8b4
								
							
						
					
					
						commit
						9552fcd9a9
					
				| 
						 | 
				
			
			@ -174,7 +174,12 @@ export const useQueue = createGlobalState(() => {
 | 
			
		|||
      await playNext(true)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    tracks.value.splice(index, 1)
 | 
			
		||||
    if (isShuffled.value) {
 | 
			
		||||
      tracks.value.splice(tracks.value.indexOf(shuffledIds.value[index]), 1)
 | 
			
		||||
      shuffledIds.value.splice(index, 1)
 | 
			
		||||
    } else {
 | 
			
		||||
      tracks.value.splice(index, 1)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (index <= currentIndex.value) {
 | 
			
		||||
      currentIndex.value -= 1
 | 
			
		||||
| 
						 | 
				
			
			@ -239,8 +244,12 @@ export const useQueue = createGlobalState(() => {
 | 
			
		|||
 | 
			
		||||
  // Reorder
 | 
			
		||||
  const reorder = (from: number, to: number) => {
 | 
			
		||||
    const [id] = tracks.value.splice(from, 1)
 | 
			
		||||
    tracks.value.splice(to, 0, id)
 | 
			
		||||
    const list = isShuffled.value
 | 
			
		||||
      ? shuffledIds
 | 
			
		||||
      : tracks
 | 
			
		||||
 | 
			
		||||
    const [id] = list.value.splice(from, 1)
 | 
			
		||||
    list.value.splice(to, 0, id)
 | 
			
		||||
 | 
			
		||||
    const current = currentIndex.value
 | 
			
		||||
    if (current === from) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -111,7 +111,6 @@ export const useTracks = createGlobalState(() => {
 | 
			
		|||
 | 
			
		||||
  // Preload next track
 | 
			
		||||
  const { start: startPreloadTimeout } = useTimeoutFn(async (index) => {
 | 
			
		||||
    console.log('@@@@', index)
 | 
			
		||||
    const { queue } = useQueue()
 | 
			
		||||
    const sound = await createSound(queue.value[index as number])
 | 
			
		||||
    await sound.preload()
 | 
			
		||||
| 
						 | 
				
			
			@ -170,7 +169,7 @@ export const useTracks = createGlobalState(() => {
 | 
			
		|||
      // NOTE: Preload next track
 | 
			
		||||
      //       Calling this function clears previous timeout and starts a new one.
 | 
			
		||||
      //       Since this watchEffect fires whenever currentIndex / nextTrack changes, it will automatically cleanup previous preload.
 | 
			
		||||
      // @ts-expect-error vueuse is wrongly typed?
 | 
			
		||||
      // @ts-expect-error vueuse is wrongly typed: https://github.com/vueuse/vueuse/issues/2691
 | 
			
		||||
      startPreloadTimeout(currentIndex.value + 1)
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue