From b2859bcd2a5145843b5ae2e024fa1b9e9549c0b0 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sat, 8 Feb 2020 20:02:15 +0900 Subject: Fix defalut note visibility setting (#5881) * Fix default note visibility setting * refactor * missing translation * fix --- src/client/components/post-form.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/client/components') diff --git a/src/client/components/post-form.vue b/src/client/components/post-form.vue index 3586223f7e..166b3c7c5f 100644 --- a/src/client/components/post-form.vue +++ b/src/client/components/post-form.vue @@ -217,7 +217,7 @@ export default Vue.extend({ // デフォルト公開範囲 this.applyVisibility(this.$store.state.settings.rememberNoteVisibility ? this.$store.state.device.visibility : this.$store.state.settings.defaultNoteVisibility); - this.localOnly = this.$store.state.settings.rememberNoteVisibility ? this.$store.state.device.localOnly : false; + this.localOnly = this.$store.state.settings.rememberNoteVisibility ? this.$store.state.device.localOnly : this.$store.state.settings.defaultNoteLocalOnly; // 公開以外へのリプライ時は元の公開範囲を引き継ぐ if (this.reply && ['home', 'followers', 'specified'].includes(this.reply.visibility)) { @@ -398,8 +398,7 @@ export default Vue.extend({ }, applyVisibility(v: string) { - if (!['public', 'home', 'followers', 'specified'].includes(v)) v = 'public'; // v11互換性のため - this.visibility = v; + this.visibility = ['public', 'home', 'followers', 'specified'].includes(v) ? v : 'public'; // v11互換性のため }, addVisibleUser() { -- cgit v1.2.3-freya