From b8daba7432c3cd9fc9ef329ef0cf71c742b04814 Mon Sep 17 00:00:00 2001
From: Xiao Gui <xgui3783@gmail.com>
Date: Thu, 22 Nov 2018 15:17:05 +0100
Subject: [PATCH] bugfix: selected parcellation obs

---
 src/ui/banner/banner.component.ts | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/ui/banner/banner.component.ts b/src/ui/banner/banner.component.ts
index 1bec07a84..c572d500e 100644
--- a/src/ui/banner/banner.component.ts
+++ b/src/ui/banner/banner.component.ts
@@ -58,7 +58,8 @@ export class AtlasBanner implements OnDestroy, OnInit {
     this.selectedParcellation$ = this.store.pipe(
       select('viewerState'),
       safeFilter('parcellationSelected'),
-      map(state => state.parcellationSelected)
+      map(state => state.parcellationSelected),
+      distinctUntilChanged((o, n) => o === n)
     )
 
     this.selectedRegions$ = merge(
@@ -283,5 +284,9 @@ export class AtlasBanner implements OnDestroy, OnInit {
   get toastDuration() {
     return this.constantService.citationToastDuration
   }
+
+  get isMobile(){
+    return this.constantService.mobile
+  }
 }
 
-- 
GitLab