Fix defalut note visibility setting (#5881)

* Fix default note visibility setting

* refactor

* missing translation

* fix
This commit is contained in:
tamaina 2020-02-08 20:02:15 +09:00 committed by GitHub
parent b58dd8c704
commit b2859bcd2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 4 deletions

View file

@ -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() {