From 0def7fa71c18f20dcdcd38f1f09391c369f52930 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Tue, 30 Jul 2024 18:19:55 -0700 Subject: feat(files): Allow toggling folder tree Signed-off-by: Christopher Ng --- apps/files/lib/Service/UserConfig.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'apps/files/lib') diff --git a/apps/files/lib/Service/UserConfig.php b/apps/files/lib/Service/UserConfig.php index b9b9248e172..c2339965793 100644 --- a/apps/files/lib/Service/UserConfig.php +++ b/apps/files/lib/Service/UserConfig.php @@ -42,6 +42,12 @@ class UserConfig { 'default' => false, 'allowed' => [true, false], ], + [ + // Whether to show the folder tree + 'key' => 'folder_tree', + 'default' => true, + 'allowed' => [true, false], + ], ]; protected IConfig $config; @@ -108,7 +114,7 @@ class UserConfig { if (!in_array($key, $this->getAllowedConfigKeys())) { throw new \InvalidArgumentException('Unknown config key'); } - + if (!in_array($value, $this->getAllowedConfigValues($key))) { throw new \InvalidArgumentException('Invalid config value'); } -- cgit v1.2.3