mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-06-14 23:41:05 +02:00
feat(follow): follow & unfollow in userinfo page
This commit is contained in:
@@ -76,6 +76,13 @@
|
||||
vm.getCountUnread();
|
||||
});
|
||||
|
||||
/**
|
||||
* user-follow-changed
|
||||
*/
|
||||
$scope.$on('user-follow-changed', function (event, u) {
|
||||
vm.user = Authentication.user = u;
|
||||
});
|
||||
|
||||
/**
|
||||
* getInvitationsCount
|
||||
*/
|
||||
@@ -97,9 +104,9 @@
|
||||
*/
|
||||
vm.getFollowCount = function (item) {
|
||||
if (item.state.indexOf('followers') >= 0) {
|
||||
return vm.user.followers.length;
|
||||
return vm.user ? vm.user.followers.length : 0;
|
||||
} else {
|
||||
return vm.user.following.length;
|
||||
return vm.user ? vm.user.following.length : 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user