From 0993204d1487a8ceb612ebaff5cdd69d6f70de5b Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 3 Apr 2018 13:35:06 +0200 Subject: [PATCH] Disable thumbnails by default --- www/common/outer/async-store.js | 3 ++- www/settings/inner.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 97d7a6d00..9a30abb33 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -380,6 +380,7 @@ define([ // Get the metadata for sframe-common-outer Store.getMetadata = function (data, cb) { + var disableThumbnails = Util.find(store.proxy, ['settings', 'general', 'disableThumbnails']); var metadata = { // "user" is shared with everybody via the userlist user: { @@ -394,7 +395,7 @@ define([ edPublic: store.proxy.edPublic, friends: store.proxy.friends || {}, settings: store.proxy.settings, - thumbnails: !Util.find(store.proxy, ['settings', 'general', 'disableThumbnails']) + thumbnails: disableThumbnails === false } }; cb(JSON.parse(JSON.stringify(metadata))); diff --git a/www/settings/inner.js b/www/settings/inner.js index 344929988..21763714d 100644 --- a/www/settings/inner.js +++ b/www/settings/inner.js @@ -259,7 +259,7 @@ define([ $spinner.hide().appendTo($div); common.getAttribute(['general', 'disableThumbnails'], function (e, val) { - $checkbox[0].checked = val; + $checkbox[0].checked = typeof(val) === "undefined" || val; }); // Reset