Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added hotkey EDIT: (ctrl+H) to like/favorite track. closes #716 #752

Merged
merged 2 commits into from
Oct 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions app/public/js/player/playerCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,16 @@ app.controller('PlayerCtrl', function (
}
});

hotkeys.add({
combo: ['command+h', 'ctrl+h'],
description: 'Heart track',
callback: function() {
$timeout(function() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the $timeout here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea, I just copied your code from another function. @weblancaster

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm I checked not sure why we have that timeout over there.. please remove and test again if works just leave the $timeout out and I will merge.. thanks

angular.element(".player_favorite").triggerHandler('click');
}, 0);
}
});

hotkeys.add({
combo: ['shift+q'],
description: 'Toggle Queue',
Expand Down