From 9ca28ebffc77f187900ffa5b4e6d63e64989cfa6 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 29 Apr 2018 17:54:50 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=90=E3=82=B0=E4=BF=AE=E6=AD=A3=E3=81=AA?= =?UTF-8?q?=E3=81=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/app/common/mios.ts | 8 +++----- src/client/app/desktop/views/components/settings.vue | 2 +- src/client/app/desktop/views/pages/welcome.vue | 12 ++++-------- src/client/app/mobile/views/pages/welcome.vue | 12 ++++-------- src/client/app/store.ts | 10 ++++++---- src/server/api/stream/home.ts | 5 +++-- 6 files changed, 21 insertions(+), 28 deletions(-) diff --git a/src/client/app/common/mios.ts b/src/client/app/common/mios.ts index 7dcae4794..3973e4ae8 100644 --- a/src/client/app/common/mios.ts +++ b/src/client/app/common/mios.ts @@ -332,7 +332,7 @@ export default class MiOS extends EventEmitter { const cachedSettings = JSON.parse(localStorage.getItem('settings')); if (cachedSettings) { - this.store.commit('settings/init', cachedSettings); + this.store.dispatch('settings/merge', cachedSettings); } //#endregion @@ -350,7 +350,7 @@ export default class MiOS extends EventEmitter { fetchme(cachedMe.token, freshData => { merge(cachedMe, freshData); - this.store.commit('settings/init', freshData.clientSettings); + this.store.dispatch('settings/merge', freshData.clientSettings); }); } else { // Get token from cookie @@ -358,9 +358,7 @@ export default class MiOS extends EventEmitter { fetchme(i, me => { if (me) { - Object.entries(me.clientSettings).forEach(([key, value]) => { - this.store.commit('settings/set', { key, value }); - }); + this.store.dispatch('settings/merge', me.clientSettings); fetched(me); } else { diff --git a/src/client/app/desktop/views/components/settings.vue b/src/client/app/desktop/views/components/settings.vue index af6ab1266..77606d425 100644 --- a/src/client/app/desktop/views/components/settings.vue +++ b/src/client/app/desktop/views/components/settings.vue @@ -41,7 +41,7 @@
- +
diff --git a/src/client/app/desktop/views/pages/welcome.vue b/src/client/app/desktop/views/pages/welcome.vue index 3d6765c97..898b6b217 100644 --- a/src/client/app/desktop/views/pages/welcome.vue +++ b/src/client/app/desktop/views/pages/welcome.vue @@ -8,7 +8,7 @@

ようこそ! MisskeyはTwitter風ミニブログSNSです。思ったことや皆と共有したいことを投稿しましょう。タイムラインを見れば、皆の関心事をすぐにチェックすることもできます。詳しく...

- +
@@ -215,13 +215,9 @@ export default Vue.extend({ > * display inline-block margin 4px - - > * - display inline-block - width 38px - height 38px - vertical-align top - border-radius 6px + width 38px + height 38px + border-radius 6px > div:last-child diff --git a/src/client/app/mobile/views/pages/welcome.vue b/src/client/app/mobile/views/pages/welcome.vue index 4d236d7aa..64cfa5a46 100644 --- a/src/client/app/mobile/views/pages/welcome.vue +++ b/src/client/app/mobile/views/pages/welcome.vue @@ -22,7 +22,7 @@
- +