Skip to content

Commit

Permalink
fix: 获取 playlist 成功后手动触发脏检查
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhao.igno committed Aug 16, 2023
1 parent 21279bf commit 40f82ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/controller/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,10 @@ angular.module('listenone').controller('NavigationController', [
$scope.is_local = data.info.id.slice(0, 2) === 'lm';

MediaService.queryPlaylist(data.info.id, 'favorite').success((res) => {
$scope.is_favorite = res.result;
// success 函数可能在异步回调中执行,需要手动触发脏检查
$scope.$apply(() => {
$scope.is_favorite = res.result;
});
});

$scope.window_type = 'list';
Expand Down

0 comments on commit 40f82ed

Please sign in to comment.