fix(front): reinitialize virtual queue list whenever queue gets empty

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2337>
This commit is contained in:
Kasper Seweryn 2023-01-23 12:48:37 +01:00 committed by Georg Krause
parent e04a1b188d
commit 9ca357c2c3
No known key found for this signature in database
GPG Key ID: 2970D504B2183D22
2 changed files with 3 additions and 2 deletions

View File

@ -427,6 +427,7 @@ const coverType = useStorage('queue:cover-type', CoverType.COVER_ART)
</h2> </h2>
</div> </div>
<virtual-list <virtual-list
v-if="queueItems.length !== 0"
ref="list" ref="list"
:list="queueItems" :list="queueItems"
:component="QueueItem" :component="QueueItem"

View File

@ -2,7 +2,7 @@ import type { Track, Artist, Album, Playlist, Library, Channel, Actor } from '~/
import type { ContentFilter } from '~/store/moderation' import type { ContentFilter } from '~/store/moderation'
import { useCurrentElement } from '@vueuse/core' import { useCurrentElement } from '@vueuse/core'
import { computed, markRaw, ref } from 'vue' import { computed, markRaw, nextTick, ref } from 'vue'
import { i18n } from '~/init/locale' import { i18n } from '~/init/locale'
import { useStore } from '~/store' import { useStore } from '~/store'
@ -155,7 +155,7 @@ export default (props: PlayOptionsProps) => {
} }
const replacePlay = async (index?: number) => { const replacePlay = async (index?: number) => {
clear() await clear()
jQuery(el.value).find('.ui.dropdown').dropdown('hide') jQuery(el.value).find('.ui.dropdown').dropdown('hide')