chore: function renaming

This commit is contained in:
Stefano Brilli 2021-07-27 09:50:21 +02:00
parent 9a0094cb5c
commit 683ed010f1
2 changed files with 5 additions and 5 deletions

View File

@ -208,7 +208,7 @@ export const Main = (props: {}) => {
const groupedTracks = useMemo(() => getGroupedTracks(disc), [disc]);
// Action Handlers
const handleSelectClick = useCallback(
const handleSelectTrackClick = useCallback(
(event: React.MouseEvent, item: number) => {
if (event.shiftKey && selected.length && lastClicked !== -1) {
let rangeBegin = Math.min(lastClicked + 1, item),
@ -361,7 +361,7 @@ export const Main = (props: {}) => {
handleRenameActionClick,
handleRenameTrack,
handleSelectAllClick,
handleSelectClick,
handleSelectTrackClick,
};
return <W95Main {...p} />;
}
@ -499,7 +499,7 @@ export const Main = (props: {}) => {
inGroup={group.title !== null}
isSelected={selected.includes(t.index)}
isCurrentTrack={isCurrentTrack(t, deviceStatus)}
onSelect={handleSelectClick}
onSelect={handleSelectTrackClick}
onRename={handleRenameTrack}
onPlay={handlePlayTrack}
/>

View File

@ -108,7 +108,7 @@ export const W95Main = (props: {
handleRenameActionClick: (event: React.MouseEvent) => void;
handleRenameTrack: (event: React.MouseEvent, item: number) => void;
handleSelectAllClick: (event: React.ChangeEvent<HTMLInputElement>) => void;
handleSelectClick: (event: React.MouseEvent, item: number) => void;
handleSelectTrackClick: (event: React.MouseEvent, item: number) => void;
}) => {
const classes = useStyles();
const themeContext = useContext(ThemeContext);
@ -200,7 +200,7 @@ export const W95Main = (props: {
style={props.selected.includes(track.index) ? themeContext.selectedTableRow : {}}
key={track.index}
onDoubleClick={(event: React.MouseEvent) => props.handleRenameTrack(event, track.index)}
onClick={(event: React.MouseEvent) => props.handleSelectClick(event, track.index)}
onClick={(event: React.MouseEvent) => props.handleSelectTrackClick(event, track.index)}
>
<TableDataCell style={{ textAlign: 'center', width: '2ch' }}>{track.index + 1}</TableDataCell>
<TableDataCell style={{ width: '80%' }}>