summaryrefslogtreecommitdiffstats
path: root/apps/files/js/filelist.js
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-10-23 08:43:02 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-10-23 08:43:02 +0200
commite0dde083d0502a4a5374feb51ea38ceaeebf7c3b (patch)
treee2168f92c44f412544a36d1e286299ed71eedde9 /apps/files/js/filelist.js
parent8652ada561baf9acac83ac88f713ab7560245cf0 (diff)
downloadnextcloud-server-e0dde083d0502a4a5374feb51ea38ceaeebf7c3b.tar.gz
nextcloud-server-e0dde083d0502a4a5374feb51ea38ceaeebf7c3b.zip
Public fixes, request & default to grid
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r--apps/files/js/filelist.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 6c86286d568..1f4d230cef0 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -599,9 +599,12 @@
*/
_onGridviewChange: function() {
var show = this.$showGridView.is(':checked');
- $.post(OC.generateUrl('/apps/files/api/v1/showgridview'), {
- show: show
- });
+ // only save state if user is logged in
+ if (OC.currentUser) {
+ $.post(OC.generateUrl('/apps/files/api/v1/showgridview'), {
+ show: show
+ });
+ }
this.$showGridView.next('#view-toggle')
.removeClass('icon-toggle-filelist icon-toggle-pictures')
.addClass(show ? 'icon-toggle-filelist' : 'icon-toggle-pictures')