mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
[#1710] some simplification on Groups memoization. No need for all that
special handling of Header Party, just have it's own controller and do specific-handling. Also, removing MenuCtrl & StatsCtrl - they weren't used TMK, I think twas a vestige of mobile. @paglias give that a gander
This commit is contained in:
10
public/js/controllers/headerCtrl.js
Normal file
10
public/js/controllers/headerCtrl.js
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
|
||||
habitrpg.controller("HeaderCtrl", ['$scope', 'Groups', 'User',
|
||||
function($scope, Groups, User) {
|
||||
$scope.party = Groups.party();
|
||||
$scope.partyMinusSelf = _.filter($scope.party, function(member){
|
||||
return member._id !== User.user._id;
|
||||
});
|
||||
}
|
||||
]);
|
||||
Reference in New Issue
Block a user