mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 13:00:13 +02:00
improve image column play handler to support long press
This commit is contained in:
@@ -245,11 +245,7 @@ export const useDefaultItemListControls = (args?: UseDefaultItemListControlsArgs
|
||||
return;
|
||||
}
|
||||
|
||||
player.addToQueueByData(songsToAdd, Play.NOW);
|
||||
|
||||
const targetIndex = clickedIndex - startIndex;
|
||||
|
||||
player.mediaPlayByIndex(targetIndex);
|
||||
player.addToQueueByData(songsToAdd, Play.NOW, item.id);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,9 @@ export const ImageColumn = (props: ItemTableListInnerColumn) => {
|
||||
|
||||
// For SONG items, use double click behavior
|
||||
if (
|
||||
(props.itemType === LibraryItem.SONG || props.itemType === LibraryItem.PLAYLIST_SONG) &&
|
||||
(props.itemType === LibraryItem.SONG ||
|
||||
props.itemType === LibraryItem.PLAYLIST_SONG ||
|
||||
item._itemType === LibraryItem.SONG) &&
|
||||
props.controls?.onDoubleClick
|
||||
) {
|
||||
// Calculate the index based on rowIndex, accounting for header if enabled
|
||||
@@ -48,6 +50,9 @@ export const ImageColumn = (props: ItemTableListInnerColumn) => {
|
||||
internalState,
|
||||
item,
|
||||
itemType: props.itemType,
|
||||
meta: {
|
||||
playType,
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user