Disable thumbnails by default

This commit is contained in:
yflory 2018-04-03 13:35:06 +02:00
parent ee46a4e862
commit 0993204d14
2 changed files with 3 additions and 2 deletions

View File

@ -380,6 +380,7 @@ define([
// Get the metadata for sframe-common-outer // Get the metadata for sframe-common-outer
Store.getMetadata = function (data, cb) { Store.getMetadata = function (data, cb) {
var disableThumbnails = Util.find(store.proxy, ['settings', 'general', 'disableThumbnails']);
var metadata = { var metadata = {
// "user" is shared with everybody via the userlist // "user" is shared with everybody via the userlist
user: { user: {
@ -394,7 +395,7 @@ define([
edPublic: store.proxy.edPublic, edPublic: store.proxy.edPublic,
friends: store.proxy.friends || {}, friends: store.proxy.friends || {},
settings: store.proxy.settings, settings: store.proxy.settings,
thumbnails: !Util.find(store.proxy, ['settings', 'general', 'disableThumbnails']) thumbnails: disableThumbnails === false
} }
}; };
cb(JSON.parse(JSON.stringify(metadata))); cb(JSON.parse(JSON.stringify(metadata)));

View File

@ -259,7 +259,7 @@ define([
$spinner.hide().appendTo($div); $spinner.hide().appendTo($div);
common.getAttribute(['general', 'disableThumbnails'], function (e, val) { common.getAttribute(['general', 'disableThumbnails'], function (e, val) {
$checkbox[0].checked = val; $checkbox[0].checked = typeof(val) === "undefined" || val;
}); });
// Reset // Reset