Skip to content

Commit

Permalink
Add filter for favorite snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
nezhar committed Oct 30, 2022
1 parent 7173d9d commit 493e49e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions src/app/components/menu/menu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@ export class MenuComponent implements OnInit, OnDestroy {
value: 'all',
icon: 'globe',
},
// ToDo: Implement in 1.1
// {
// name: 'Favorites',
// value: 'favorites',
// icon: 'star'
// },
{
name: 'Unlabeled',
value: 'unlabeled',
icon: 'tag',
},
{
name: 'Favorites',
value: 'favorites',
icon: 'star'
},
{
name: 'Public',
value: 'public',
Expand Down
2 changes: 1 addition & 1 deletion src/app/services/navigation/activeFilter.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class ActiveFilterService {
this.store.dispatch(new UpdateSnippetFilter({}, reload));
break;
case 'favorites':
console.log('Not implemented');
this.store.dispatch(new UpdateSnippetFilter({ favorite: 'True' }, reload));
break;
case 'unlabeled':
this.store.dispatch(new UpdateSnippetFilter({ labeled: 'False' }, reload));
Expand Down

0 comments on commit 493e49e

Please sign in to comment.