From 3181e49e41498fe88674724b5e83723e8cd11b88 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 28 Jan 2020 18:53:49 +0100 Subject: [PATCH] Content page. --- frontend/app/shared/state/contents.state.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/app/shared/state/contents.state.ts b/frontend/app/shared/state/contents.state.ts index e41e6a4e2..51c9bf2eb 100644 --- a/frontend/app/shared/state/contents.state.ts +++ b/frontend/app/shared/state/contents.state.ts @@ -16,6 +16,7 @@ import { Pager, shareSubscribed, State, + Types, Version, Versioned } from '@app/framework'; @@ -56,15 +57,11 @@ interface Snapshot { canCreateAndPublish?: boolean; } -function sameContent(lhs: ContentDto, rhs?: ContentDto): boolean { - return lhs === rhs || (!!lhs && !!rhs && lhs.id === rhs.id && lhs.version.eq(rhs.version)); -} - export abstract class ContentsStateBase extends State { private previousId: string; public selectedContent = - this.project(x => x.selectedContent, sameContent); + this.project(x => x.selectedContent, Types.equals); public contents = this.project(x => x.contents);