forked from Mastodon/mastoradio-la-radio-di-mastodon
wip no more next track
This commit is contained in:
parent
6ea7de42f4
commit
82f382099e
|
@ -3,10 +3,10 @@
|
|||
<div class="queue__sectionTitle">Next song</div>
|
||||
<div class="track">
|
||||
<div class="track__main" on:click={() => select($next)}>
|
||||
<div class="track__title" class:placeholder={!$next}>
|
||||
<div class="track__title" class:placeholder={!$next && $enqueueing}>
|
||||
{#if $next}{$next.media.title}{/if}
|
||||
</div>
|
||||
<div class="track__subtitle" class:placeholder={!$next}>
|
||||
<div class="track__subtitle" class:placeholder={!$next && $enqueueing}>
|
||||
{#if $next}
|
||||
shared by <span class="track__username">{$next.referer.username}</span> •
|
||||
<DistanceDate date={$next.referer.date} />
|
||||
|
|
|
@ -81,8 +81,14 @@
|
|||
|
||||
$iterator.next().then(({ done, value }) => {
|
||||
enqueueing.set(false)
|
||||
$next = value
|
||||
set($next)
|
||||
|
||||
if (done) {
|
||||
console.log('done')
|
||||
set(null)
|
||||
} else {
|
||||
$next = value
|
||||
set($next)
|
||||
}
|
||||
}).catch(console.error)
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue