Skip to content

Commit 0d7266c

Browse files
committed
Merge pull request #552 from Soundnode/fix-like-player
Fix favorite button in player bar
2 parents f763dda + c8967c2 commit 0d7266c

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

app/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ <h4 id="playerUser" class="player_user" ng-click="goToUser($event)"></h4>
150150
<span class="player_duration" id="player-duration"></span>
151151
</div>
152152
<div class="player_actions">
153-
<span class="player_favorite" ng-click="favorite($event)" ng-if="isSongPlaying">
153+
<span class="player_favorite" ng-click="favorite($event)" ng-hide="!isSongPlaying">
154154
&nbsp;<i class="fa fa-heart"></i>
155155
</span>
156156
</div>

app/public/js/common/playerService.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ app.factory('playerService', function(
161161

162162
$rootScope.isSongPlaying = true;
163163
$rootScope.$broadcast('activateQueue');
164+
165+
// remove the active class from player favorite icon before play new song
166+
// TODO: this should check if the current song is already favorited
167+
document.querySelector('.player_favorite').classList.remove('active');
164168
};
165169

166170
/**

app/public/js/system/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var ua = require('universal-analytics');
66
window.settings = {};
77

88
// App version
9-
window.settings.appVersion = '0.6.1';
9+
window.settings.appVersion = '0.6.2';
1010

1111
// GA >> DO NOT CHANGE OR USE THIS CODE <<
1212
window.settings.visitor = ua('UA-67310953-1');

0 commit comments

Comments
 (0)