aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/todos
diff options
context:
space:
mode:
authorLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-09-05 16:39:53 +0200
committerLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-09-05 16:39:53 +0200
commitad2a3f3f87252711a9f3cc13916acf0fdff2949e (patch)
tree21f43223a2166033f2e309784f5c8fd9a7b1de33 /src/features/todos
parentRemove news item on CTA clicks (diff)
downloadferdium-app-ad2a3f3f87252711a9f3cc13916acf0fdff2949e.tar.gz
ferdium-app-ad2a3f3f87252711a9f3cc13916acf0fdff2949e.tar.zst
ferdium-app-ad2a3f3f87252711a9f3cc13916acf0fdff2949e.zip
Fix delay app ux in combination with announcements
Diffstat (limited to 'src/features/todos')
-rw-r--r--src/features/todos/containers/TodosScreen.js2
-rw-r--r--src/features/todos/store.js7
2 files changed, 6 insertions, 3 deletions
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';
11@inject('stores', 'actions') @observer 11@inject('stores', 'actions') @observer
12class TodosScreen extends Component { 12class TodosScreen extends Component {
13 render() { 13 render() {
14 if (!todosStore || !todosStore.isFeatureActive) { 14 if (!todosStore || !todosStore.isFeatureActive || todosStore.isTodosPanelForceHidden) {
15 return null; 15 return null;
16 } 16 }
17 17
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 {
29 return width < TODOS_MIN_WIDTH ? TODOS_MIN_WIDTH : width; 29 return width < TODOS_MIN_WIDTH ? TODOS_MIN_WIDTH : width;
30 } 30 }
31 31
32 @computed get isTodosPanelForceHidden() {
33 const { isAnnouncementShown } = this.stores.announcements;
34 return delayAppState.isDelayAppScreenVisible || isAnnouncementShown;
35 }
36
32 @computed get isTodosPanelVisible() { 37 @computed get isTodosPanelVisible() {
33 if (delayAppState.isDelayAppScreenVisible) return false;
34 if (this.settings.isTodosPanelVisible === undefined) return DEFAULT_TODOS_VISIBLE; 38 if (this.settings.isTodosPanelVisible === undefined) return DEFAULT_TODOS_VISIBLE;
35
36 return this.settings.isTodosPanelVisible; 39 return this.settings.isTodosPanelVisible;
37 } 40 }
38 41