aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/todos
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-09-11 11:03:39 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-09-11 11:03:39 +0200
commit0f2fe50e811531945ab6dfe67f604c9eddbb6239 (patch)
treefe8ca79d25083071573e4b986366b2cfafa77095 /src/features/todos
parentfix(Settings): Don't toggle Todos on general settings changes (diff)
downloadferdium-app-0f2fe50e811531945ab6dfe67f604c9eddbb6239.tar.gz
ferdium-app-0f2fe50e811531945ab6dfe67f604c9eddbb6239.tar.zst
ferdium-app-0f2fe50e811531945ab6dfe67f604c9eddbb6239.zip
Fix(Todos): Fix Todos Menu
Diffstat (limited to 'src/features/todos')
-rw-r--r--src/features/todos/store.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/features/todos/store.js b/src/features/todos/store.js
index 05eef4ec1..abf176604 100644
--- a/src/features/todos/store.js
+++ b/src/features/todos/store.js
@@ -33,7 +33,7 @@ export default class TodoStore extends FeatureStore {
33 33
34 @computed get isTodosPanelForceHidden() { 34 @computed get isTodosPanelForceHidden() {
35 const { isAnnouncementShown } = this.stores.announcements; 35 const { isAnnouncementShown } = this.stores.announcements;
36 return delayAppState.isDelayAppScreenVisible || !this.settings.isFeatureEnabledByUser || isAnnouncementShown; 36 return delayAppState.isDelayAppScreenVisible || !this.isFeatureEnabledByUser || isAnnouncementShown;
37 } 37 }
38 38
39 @computed get isTodosPanelVisible() { 39 @computed get isTodosPanelVisible() {
@@ -41,6 +41,10 @@ export default class TodoStore extends FeatureStore {
41 return this.settings.isTodosPanelVisible; 41 return this.settings.isTodosPanelVisible;
42 } 42 }
43 43
44 @computed get isFeatureEnabledByUser() {
45 return this.settings.isFeatureEnabledByUser;
46 }
47
44 @computed get settings() { 48 @computed get settings() {
45 return localStorage.getItem('todos') || {}; 49 return localStorage.getItem('todos') || {};
46 } 50 }