Browse Source

Clean up click handler logic

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

4
src/components/player/NowPlayingView.tsx

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

9
src/components/starred/StarredView.tsx

@ -65,18 +65,9 @@ const StarredView = () => {
if (e.ctrlKey) { if (e.ctrlKey) {
dispatch(toggleSelected(rowData)); dispatch(toggleSelected(rowData));
} else if (e.shiftKey) { } 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(setRangeSelected(rowData));
dispatch(toggleRangeSelected(tableData)); dispatch(toggleRangeSelected(tableData));
} }
}
}, 100); }, 100);
} }
}; };

Loading…
Cancel
Save