From ad2a3f3f87252711a9f3cc13916acf0fdff2949e Mon Sep 17 00:00:00 2001 From: Dominik Guzei Date: Thu, 5 Sep 2019 16:39:53 +0200 Subject: Fix delay app ux in combination with announcements --- src/features/todos/containers/TodosScreen.js | 2 +- src/features/todos/store.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/features/todos') diff --git a/src/features/todos/containers/TodosScreen.js b/src/features/todos/containers/TodosScreen.js index 65afc985b..a5da0b014 100644 --- a/src/features/todos/containers/TodosScreen.js +++ b/src/features/todos/containers/TodosScreen.js @@ -11,7 +11,7 @@ import { todoActions } from '../actions'; @inject('stores', 'actions') @observer class TodosScreen extends Component { render() { - if (!todosStore || !todosStore.isFeatureActive) { + if (!todosStore || !todosStore.isFeatureActive || todosStore.isTodosPanelForceHidden) { return null; } diff --git a/src/features/todos/store.js b/src/features/todos/store.js index aebe0dcbe..ea05077ab 100644 --- a/src/features/todos/store.js +++ b/src/features/todos/store.js @@ -29,10 +29,13 @@ export default class TodoStore extends FeatureStore { return width < TODOS_MIN_WIDTH ? TODOS_MIN_WIDTH : width; } + @computed get isTodosPanelForceHidden() { + const { isAnnouncementShown } = this.stores.announcements; + return delayAppState.isDelayAppScreenVisible || isAnnouncementShown; + } + @computed get isTodosPanelVisible() { - if (delayAppState.isDelayAppScreenVisible) return false; if (this.settings.isTodosPanelVisible === undefined) return DEFAULT_TODOS_VISIBLE; - return this.settings.isTodosPanelVisible; } -- cgit v1.2.3-54-g00ecf