From f87001c22f8c85bddb78c975f0bc22b8bfdcd27c Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 13 Dec 2018 20:25:46 +0300 Subject: [PATCH] fix old MR --- src/boot/after_store.js | 4 ++++ src/main.js | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 07337595..a8594a64 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -28,6 +28,10 @@ const afterStoreSetup = ({ store, i18n }) => { store.dispatch('setInstanceOption', { name: 'textlimit', value: parseInt(textlimit) }) store.dispatch('setInstanceOption', { name: 'server', value: server }) + if (data.nsfwCensorImage) { + store.dispatch('setInstanceOption', { name: 'nsfwCensorImage', value: data.nsfwCensorImage }) + } + if (vapidPublicKey) { store.dispatch('setInstanceOption', { name: 'vapidPublicKey', value: vapidPublicKey }) } diff --git a/src/main.js b/src/main.js index 6ce2df13..bf92e78e 100644 --- a/src/main.js +++ b/src/main.js @@ -60,9 +60,6 @@ const registerPushNotifications = store => { if (isUserMutation && vapidPublicKey && permission) { return store.dispatch('registerPushNotifications') } - if (data['nsfwCensorImage']) { - store.dispatch('setOption', { name: 'nsfwCensorImage', value: data['nsfwCensorImage'] }) - } const user = state.users.currentUser const isVapidMutation = mutation.type === 'setInstanceOption' && mutation.payload.name === 'vapidPublicKey'