VRFS-1437 update play and like stats during refresh

This commit is contained in:
Brian Smith 2014-04-08 01:21:10 -04:00
parent 5784c26089
commit 4906c2b902
2 changed files with 3 additions and 1 deletions

View File

@ -138,7 +138,9 @@
rest.getClaimedRecording(claimedRecordingId)
.done(function(response) {
if (response.recording && response.recording.comments) {
$("#spnPlayCount", $scope).html(response.recording.play_count);
$("#spnCommentCount", $scope).html(response.recording.comment_count);
$("#spnLikeCount", $scope).html(response.recording.like_count);
$.each(response.recording.comments, function(index, val) {
renderComment(val.comment, val.creator.id, val.creator.name,
context.JK.resolveAvatarUrl(val.creator.photo_url), $.timeago(val.created_at), val.creator.musician, true);

View File

@ -138,8 +138,8 @@
rest.getSessionHistory(musicSessionId)
.done(function(response) {
if (response && response.comments) {
console.log("%o", response.comment_count);
$("#spnCommentCount", $scope).html(response.comment_count);
$("#spnLikeCount", $scope).html(response.like_count);
$.each(response.comments, function(index, val) {
renderComment(val.comment, val.creator.id, val.creator.name,
context.JK.resolveAvatarUrl(val.creator.photo_url), $.timeago(val.created_at), val.creator.musician, true);