From bb2ff977a581abf2176d7098c28c6e0df29661d8 Mon Sep 17 00:00:00 2001 From: shpuld Date: Thu, 31 Jan 2019 21:01:10 +0200 Subject: [PATCH] Default video inlining true and make the config stuff work --- src/boot/after_store.js | 1 + src/components/settings/settings.js | 4 +++- static/config.json | 4 +--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 5693dcc6..fd53db9c 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -86,6 +86,7 @@ const afterStoreSetup = ({ store, i18n }) => { copyInstanceOption('subjectLineBehavior') copyInstanceOption('alwaysShowSubjectInput') copyInstanceOption('noAttachmentLinks') + copyInstanceOption('playVideosInline') if ((config.chatDisabled)) { store.dispatch('disableChat') diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js index 06011e7c..ba7feeab 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -66,7 +66,9 @@ const settings = { Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'webkitAudioDecodedByteCount') || // Future spec, still not supported in Nightly 63 as of 08/2018 Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'audioTracks'), - playVideosInline: user.playVideosInline, + playVideosInline: typeof user.playVideosInline === 'undefined' + ? instance.playVideosInline + : user.playVideosInline, useContainFit: user.useContainFit } }, diff --git a/static/config.json b/static/config.json index aac93f70..b71c2cfd 100644 --- a/static/config.json +++ b/static/config.json @@ -20,7 +20,5 @@ "webPushNotifications": false, "noAttachmentLinks": false, "nsfwCensorImage": "", - "useOneClickNsfw": true, - "playVideosInline": false, - "useContainFit": false + "playVideosInline": true, }