Disable thumbnails by default

pull/1/head
yflory 7 years ago
parent ee46a4e862
commit 0993204d14

@ -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)));

@ -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

Loading…
Cancel
Save