From 5621d5725c747da214f6c6f8721ffb5a86fb6f2b Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 30 Dec 2018 14:43:03 +0900 Subject: [PATCH] [Client] Fix bug --- .../common/views/components/visibility-chooser.vue | 12 ++++++++++-- .../app/desktop/views/components/post-form.vue | 3 ++- src/client/app/mobile/views/components/post-form.vue | 3 ++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/client/app/common/views/components/visibility-chooser.vue b/src/client/app/common/views/components/visibility-chooser.vue index f2603a9f39..283f6dd75e 100644 --- a/src/client/app/common/views/components/visibility-chooser.vue +++ b/src/client/app/common/views/components/visibility-chooser.vue @@ -59,10 +59,18 @@ import * as anime from 'animejs'; export default Vue.extend({ i18n: i18n('common/views/components/visibility-chooser.vue'), - props: ['source'], + props: { + source: { + required: true + }, + currentVisibility: { + type: String, + required: false + } + }, data() { return { - v: this.$store.state.settings.rememberNoteVisibility ? (this.$store.state.device.visibility || this.$store.state.settings.defaultNoteVisibility) : this.$store.state.settings.defaultNoteVisibility + v: this.$store.state.settings.rememberNoteVisibility ? (this.$store.state.device.visibility || this.$store.state.settings.defaultNoteVisibility) : (this.currentVisibility || this.$store.state.settings.defaultNoteVisibility) } }, mounted() { diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue index 7ed8cf02ce..98c16cd5d0 100644 --- a/src/client/app/desktop/views/components/post-form.vue +++ b/src/client/app/desktop/views/components/post-form.vue @@ -381,7 +381,8 @@ export default Vue.extend({ setVisibility() { const w = this.$root.new(MkVisibilityChooser, { - source: this.$refs.visibilityButton + source: this.$refs.visibilityButton, + currentVisibility: this.visibility }); w.$once('chosen', v => { this.applyVisibility(v); diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue index 26850cabb4..00d0eebd6a 100644 --- a/src/client/app/mobile/views/components/post-form.vue +++ b/src/client/app/mobile/views/components/post-form.vue @@ -300,7 +300,8 @@ export default Vue.extend({ setVisibility() { const w = this.$root.new(MkVisibilityChooser, { - source: this.$refs.visibilityButton + source: this.$refs.visibilityButton, + currentVisibility: this.visibility }); w.$once('chosen', v => { this.applyVisibility(v);