summaryrefslogtreecommitdiffstats
path: root/src/services
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2021-06-01 08:38:06 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2021-06-01 08:38:06 +0200
commit39551e2a4b5bff9be3145103b29188fab831c748 (patch)
treed5812baac277313d368de273a6dd101067ad1c22 /src/services
parent1f8f133d878756dbb519e345c26b3a9827376a4b (diff)
Handle circles being disabled
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src/services')
-rw-r--r--src/services/isCirclesEnabled.js26
-rw-r--r--src/services/isContactsInteractionEnabled.js4
2 files changed, 28 insertions, 2 deletions
diff --git a/src/services/isCirclesEnabled.js b/src/services/isCirclesEnabled.js
new file mode 100644
index 00000000..8960de3e
--- /dev/null
+++ b/src/services/isCirclesEnabled.js
@@ -0,0 +1,26 @@
+/**
+ * @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com>
+ *
+ * @author John Molakvoæ <skjnldsv@protonmail.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+import { loadState } from '@nextcloud/initial-state'
+
+const isCirclesEnabled = loadState('contacts', 'isCirclesEnabled', false)
+export default isCirclesEnabled
diff --git a/src/services/isContactsInteractionEnabled.js b/src/services/isContactsInteractionEnabled.js
index f6434245..dbe8b80d 100644
--- a/src/services/isContactsInteractionEnabled.js
+++ b/src/services/isContactsInteractionEnabled.js
@@ -22,5 +22,5 @@
import { loadState } from '@nextcloud/initial-state'
-const contactsinteraction = loadState('contacts', 'contactsinteraction')
-export default contactsinteraction
+const isContactsInteractionEnabled = loadState('contacts', 'isContactsInteractionEnabled', false)
+export default isContactsInteractionEnabled