summaryrefslogtreecommitdiffstats
path: root/apps/files/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-10-04 15:14:15 +0200
committerJan-Christoph Borchardt <hey@jancborchardt.net>2018-10-18 13:44:07 +0200
commitc4cce1413487f5a0e870dd2139a4c624a97981fd (patch)
tree29fbd6c36d3ca8de130f37d9ce8b6ca376347eb0 /apps/files/lib
parent49fda8ba56860918d2e424ca07c94c08237846d4 (diff)
downloadnextcloud-server-c4cce1413487f5a0e870dd2139a4c624a97981fd.tar.gz
nextcloud-server-c4cce1413487f5a0e870dd2139a4c624a97981fd.zip
Remember toggle and events handler
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/lib')
-rw-r--r--apps/files/lib/Controller/ApiController.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/files/lib/Controller/ApiController.php b/apps/files/lib/Controller/ApiController.php
index 9443b9776ae..3c1eb6e43fb 100644
--- a/apps/files/lib/Controller/ApiController.php
+++ b/apps/files/lib/Controller/ApiController.php
@@ -268,6 +268,18 @@ class ApiController extends Controller {
}
/**
+ * Toggle default for files grid view
+ *
+ * @NoAdminRequired
+ *
+ * @param bool $show
+ */
+ public function showGridView($show) {
+ $this->config->setUserValue($this->userSession->getUser()->getUID(), 'files', 'show_grid', (int)$show);
+ return new Response();
+ }
+
+ /**
* Toggle default for showing/hiding xxx folder
*
* @NoAdminRequired