Browse Source

Clean up click handler logic

master
jeffvli 3 years ago
committed by Jeff
parent
commit
a4f571af70
  1. 6
      src/components/player/NowPlayingView.tsx
  2. 13
      src/components/starred/StarredView.tsx

6
src/components/player/NowPlayingView.tsx

@ -127,11 +127,7 @@ const NowPlayingView = () => {
dispatch(toggleSelected(rowData));
} else if (e.shiftKey) {
dispatch(setRangeSelected(rowData));
if (searchQuery !== '') {
dispatch(toggleRangeSelected(filteredData));
} else {
dispatch(toggleRangeSelected(tableData));
}
dispatch(toggleRangeSelected(tableData));
}
}, 100);
}

13
src/components/starred/StarredView.tsx

@ -65,17 +65,8 @@ const StarredView = () => {
if (e.ctrlKey) {
dispatch(toggleSelected(rowData));
} else if (e.shiftKey) {
if (favorite.active.tab === 'tracks') {
dispatch(setRangeSelected(rowData));
if (searchQuery !== '') {
dispatch(toggleRangeSelected(filteredData));
} else {
dispatch(toggleRangeSelected(data.song));
}
} else if (favorite.active.tab === 'albums') {
dispatch(setRangeSelected(rowData));
dispatch(toggleRangeSelected(tableData));
}
dispatch(setRangeSelected(rowData));
dispatch(toggleRangeSelected(tableData));
}
}, 100);
}

Loading…
Cancel
Save