chore: function renaming
This commit is contained in:
parent
9a0094cb5c
commit
683ed010f1
|
@ -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}
|
||||
/>
|
||||
|
|
|
@ -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%' }}>
|
||||
|
|
Loading…
Reference in New Issue