From 55b19e6318e8501915b4f64f8649695ed512de3b Mon Sep 17 00:00:00 2001
From: jojohoch <joachim.hoch@iqb.hu-berlin.de>
Date: Thu, 9 Dec 2021 16:38:53 +0100
Subject: [PATCH] [player] Fix presented page status when reloading a unit

The status of a page is defined by the state of its elements.
Therefore, after restoring the elements, a check of the status of a
page must be triggered.
---
 projects/player/src/app/services/unit-state.service.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/projects/player/src/app/services/unit-state.service.ts b/projects/player/src/app/services/unit-state.service.ts
index de75bbcc9..3e7a67b5d 100644
--- a/projects/player/src/app/services/unit-state.service.ts
+++ b/projects/player/src/app/services/unit-state.service.ts
@@ -83,7 +83,7 @@ export class UnitStateService {
     const unitStateElementCode = this.getUnitStateElement(id);
     if (unitStateElementCode) {
       // Set status only if it is higher than the old status
-      if (UnitStateElementCodeStatusValue[status] > UnitStateElementCodeStatusValue[unitStateElementCode.status]) {
+      if (UnitStateElementCodeStatusValue[status] >= UnitStateElementCodeStatusValue[unitStateElementCode.status]) {
         unitStateElementCode.status = status;
         this._unitStateElementCodeChanged.next(unitStateElementCode);
         this.checkPresentedPageStatus(id);
-- 
GitLab