···2233## Next
44- Fix queue panel deleting/moving incorrect tracks
55+- Fix queue not refreshing after toggling history
5667## 0.19.1 - 2024 Oct 25
78- Fix folder playlists not closing
+13-7
src/components/Queue.svelte
···77 queue,
88 type QueueItem,
99 } from '../lib/queue'
1010- import { onDestroy } from 'svelte'
1010+ import { onDestroy, tick } from 'svelte'
1111 import QueueItemComponent from './QueueItem.svelte'
1212 import { dragged } from '@/lib/drag-drop'
1313 import { get_track } from '@/lib/data'
···3434 $: first_visible_index = show_history ? 0 : up_next_index
3535 $: autoplay_index = up_next_index + $queue.user_queue.length
36363737- let history_list: VirtualListBlock<QueueItem>
3838- let up_next_list: VirtualListBlock<QueueItem>
3737+ let history_list: VirtualListBlock<QueueItem> | null
3838+ let up_next_list: VirtualListBlock<QueueItem> | null
3939 let autoplay_list: VirtualListBlock<QueueItem>
40404141 let visible_qids = [
···5454 scroll_to: ({ index }) => {
5555 if (show_history) {
5656 if (index < $queue.past.length) {
5757- return history_list.scroll_to_index(index, 40)
5757+ return history_list?.scroll_to_index(index, 40)
5858 }
5959 index -= $queue.past.length
6060 if ($queue.current && index === 0) {
6161- return history_list.scroll_to_index(index, 40)
6161+ return history_list?.scroll_to_index(index, 40)
6262 }
6363 index -= Number(!!$queue.current)
6464 }
6565 if (index < $queue.user_queue.length) {
6666- return up_next_list.scroll_to_index(index, 40)
6666+ return up_next_list?.scroll_to_index(index, 40)
6767 }
6868 index -= $queue.user_queue.length
6969 autoplay_list.scroll_to_index(index, 40)
···202202 <div class="relative">
203203 <div class="sticky top-0 z-1 flex flex h-[40px] items-center bg-black/50 backdrop-blur-md">
204204 <button
205205- on:click={() => (show_history = !show_history)}
205205+ on:click={() => {
206206+ show_history = !show_history
207207+ tick().then(() => {
208208+ up_next_list?.refresh()
209209+ autoplay_list.refresh()
210210+ })
211211+ }}
206212 class="group ml-1.5 flex h-full items-center pl-1 font-semibold"
207213 tabindex="-1"
208214 on:mousedown|preventDefault