mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-22 03:34:14 +00:00
Don't persist properties of tag filters (#7564)
* fix(filters): don't persist tag props Partial fix for #7412 * fix(test): correct expectation
This commit is contained in:
parent
0b122f3b43
commit
9b56c6f2ba
2 changed files with 2 additions and 2 deletions
|
|
@ -27,7 +27,7 @@ describe('Filters Controller', function() {
|
|||
scope.toggleFilter(tag);
|
||||
expect(userService.user.filters[tag.id]).to.eql(true);
|
||||
scope.toggleFilter(tag);
|
||||
expect(userService.user.filters[tag.id]).to.eql(false);
|
||||
expect(userService.user.filters[tag.id]).to.not.eql(true);
|
||||
}));
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ habitrpg.controller("FiltersCtrl", ['$scope', '$rootScope', 'User', 'Shared',
|
|||
if (!user.filters[tag.id]) {
|
||||
user.filters[tag.id] = true;
|
||||
} else {
|
||||
user.filters[tag.id] = !user.filters[tag.id];
|
||||
delete user.filters[tag.id];
|
||||
}
|
||||
|
||||
// no longer persisting this, it was causing a lot of confusion - users thought they'd permanently lost tasks
|
||||
|
|
|
|||
Loading…
Reference in a new issue