mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-07 09:53:17 +00:00
fix: resolve double-click and redownload issues
- Use `e.detail === 2` for double clicks in `DownloadTable.tsx` - Add `user-select: none` to list items in `index.css` - Delete existing assets before enqueueing in `redownload` action - Remove redundant `onDoubleClick` props from `DownloadItem.tsx`
This commit is contained in:
@@ -189,6 +189,10 @@ export const DownloadTable: React.FC<DownloadTableProps> = ({ filter }) => {
|
||||
? [...filteredDownloads].sort((left, right) => (left.queuePosition ?? 0) - (right.queuePosition ?? 0))
|
||||
: filteredDownloads;
|
||||
const handleItemClick = (e: React.MouseEvent, item: DownloadItem) => {
|
||||
if (e.detail === 2) {
|
||||
handleDownloadDoubleClick(item);
|
||||
return;
|
||||
}
|
||||
if (e.metaKey || e.ctrlKey) {
|
||||
const newSelected = new Set(selectedIds);
|
||||
if (newSelected.has(item.id)) {
|
||||
@@ -372,7 +376,6 @@ export const DownloadTable: React.FC<DownloadTableProps> = ({ filter }) => {
|
||||
setContextMenu={handleContextMenu}
|
||||
handlePause={handlePause}
|
||||
handleResume={handleResume}
|
||||
handleDoubleClick={handleDownloadDoubleClick}
|
||||
getCategoryIcon={getCategoryIcon}
|
||||
isSelected={selectedIds.has(d.id)}
|
||||
onClick={handleItemClick}
|
||||
|
||||
Reference in New Issue
Block a user