Skip to content

Commit

Permalink
run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
sabersalv committed Mar 22, 2021
1 parent e29b3b9 commit 449364c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ const displayTorrentDetails = (hash: string) => UIActions.displayModal({id: 'tor
const selectTorrent = (hash: string, event: KeyboardEvent | MouseEvent | TouchEvent) =>
UIActions.handleTorrentClick({hash, event});

const selectAllTorrents = () =>
UIActions.selectAllTorrents();
const selectAllTorrents = () => UIActions.selectAllTorrents();

const onKeyPress = (hash: string, e: KeyboardEvent) => {
if (e.key === ' ' || e.key === 'Enter' || e.key === 'ContextMenu') {
Expand All @@ -70,13 +69,13 @@ const onKeyPress = (hash: string, e: KeyboardEvent) => {
};

const onKeyDown = (e: KeyboardEvent) => {
const { repeat, metaKey, ctrlKey, key } = e;
const {repeat, metaKey, ctrlKey, key} = e;
if (repeat) return;
if ((metaKey || ctrlKey) && key === 'a') {
e.preventDefault();
selectAllTorrents();
}
}
};

interface TorrentListRowProps {
hash: string;
Expand Down
2 changes: 1 addition & 1 deletion client/src/javascript/stores/TorrentStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class TorrentStore {
}

selectAllTorrents() {
this.selectedTorrents = this.filteredTorrents.map(v => v.hash)
this.selectedTorrents = this.filteredTorrents.map((v) => v.hash);
}

handleTorrentListDiffChange(torrentListDiffs: Operation[]) {
Expand Down

0 comments on commit 449364c

Please sign in to comment.