mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
add image loader/unloader and only toggle source
This commit is contained in:
parent
1aac1a6361
commit
f5af1c314c
3 changed files with 34 additions and 33 deletions
|
|
@ -78,7 +78,7 @@ export const useHandlePlayQueueAdd = () => {
|
|||
// Allow this to be undefined for "play shuffled". If undefined, default to 0,
|
||||
// otherwise, choose the selected item in the queue
|
||||
let initialSongIndex: number | undefined;
|
||||
let toastId: string | null = null;
|
||||
let toastId: null | string = null;
|
||||
|
||||
if (byItemType) {
|
||||
let songList: SongListResponse | undefined;
|
||||
|
|
@ -148,9 +148,9 @@ export const useHandlePlayQueueAdd = () => {
|
|||
|
||||
clearTimeout(timeoutIds.current[fetchId] as ReturnType<typeof setTimeout>);
|
||||
delete timeoutIds.current[fetchId];
|
||||
if(toastId){
|
||||
if (toastId) {
|
||||
toast.hide(toastId);
|
||||
}
|
||||
}
|
||||
} catch (err: any) {
|
||||
if (instanceOfCancellationError(err)) {
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -230,19 +230,19 @@ export const AddToPlaylistContextModal = ({
|
|||
clearable
|
||||
data={playlistSelect}
|
||||
disabled={playlistList.isLoading}
|
||||
dropdownOpened={isDropdownOpened}
|
||||
label={t('form.addToPlaylist.input', {
|
||||
context: 'playlists',
|
||||
postProcess: 'titleCase',
|
||||
})}
|
||||
searchable
|
||||
size="md"
|
||||
dropdownOpened={isDropdownOpened}
|
||||
{...form.getInputProps('playlistId')}
|
||||
onClick={() => setIsDropdownOpened(true)}
|
||||
onChange={(e) => {
|
||||
setIsDropdownOpened(false);
|
||||
form.getInputProps('playlistId').onChange(e);
|
||||
}}
|
||||
onClick={() => setIsDropdownOpened(true)}
|
||||
/>
|
||||
<Switch
|
||||
label={t('form.addToPlaylist.input', {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue