Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove recents and favorites when entities are deleted #4431

Merged
merged 13 commits into from
Jul 24, 2020
Prev Previous commit
Next Next commit
Remove debug logging/subscription leak
  • Loading branch information
nwmac committed Jul 6, 2020
commit 9581421cd26b988ec7b55cefaad22a969b65e5ba
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from 'frontend/packages/store/src/reducers/current-user-roles-reducer/recently-visited.reducer.helpers';
import * as moment from 'moment';
import { Observable, of as observableOf } from 'rxjs';
import { first, map } from 'rxjs/operators';
import { map } from 'rxjs/operators';

import { AppState } from '../../../../../store/src/app-state';
import { endpointEntityType } from '../../../../../store/src/helpers/stratos-entity-factory';
Expand Down Expand Up @@ -54,13 +54,6 @@ export class RecentEntitiesComponent {
public hasHits$: Observable<boolean>;
constructor(store: Store<AppState>) {
const recentEntities$ = store.select(recentlyVisitedSelector);

recentEntities$.pipe(first()).subscribe(e => {
console.log('recent entities');
console.log(e);
console.log(Object.keys(e).length);
});

this.recentEntities$ = recentEntities$.pipe(
map(entities => Object.values(entities)),
map((entities: IRecentlyVisitedEntity[]) => {
Expand Down