summaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Controller
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-10-23 10:38:00 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-10-23 10:38:00 +0200
commit26ca7a0e2f86cb76726073f2d73fd5cb8a1e09d9 (patch)
treeceabf9cc65621e982a1ebd7b9eda19a6aa5ae579 /apps/files/lib/Controller
parentc039bd2bd115afd23b4f24578f62b50fe87d48b4 (diff)
downloadnextcloud-server-26ca7a0e2f86cb76726073f2d73fd5cb8a1e09d9.tar.gz
nextcloud-server-26ca7a0e2f86cb76726073f2d73fd5cb8a1e09d9.zip
Add filepicker toggle
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/lib/Controller')
-rw-r--r--apps/files/lib/Controller/ApiController.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/files/lib/Controller/ApiController.php b/apps/files/lib/Controller/ApiController.php
index 3c1eb6e43fb..e70f34bd1a4 100644
--- a/apps/files/lib/Controller/ApiController.php
+++ b/apps/files/lib/Controller/ApiController.php
@@ -38,6 +38,7 @@ use OCP\Files\NotFoundException;
use OCP\IConfig;
use OCP\IRequest;
use OCP\AppFramework\Http\DataResponse;
+use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\FileDisplayResponse;
use OCP\AppFramework\Http\Response;
use OCA\Files\Service\TagService;
@@ -280,6 +281,16 @@ class ApiController extends Controller {
}
/**
+ * Get default settings for the grid view
+ *
+ * @NoAdminRequired
+ */
+ public function getGridView() {
+ $status = $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'show_grid', '1') === '1';
+ return new JSONResponse(['gridview' => $status]);
+ }
+
+ /**
* Toggle default for showing/hiding xxx folder
*
* @NoAdminRequired