forked from mirrors/akkoma-fe
post_status_form: reset all to defaults on clear
This commit is contained in:
parent
8e39d4fad6
commit
0eb6f65dcb
1 changed files with 6 additions and 2 deletions
|
|
@ -343,6 +343,7 @@ const PostStatusForm = {
|
|||
},
|
||||
clearStatus () {
|
||||
const config = this.$store.getters.mergedConfig
|
||||
const postLanguage = config.postLanguage || interfaceToISOLanguage(config.interfaceLanguage)
|
||||
this.newStatus = {
|
||||
status: '',
|
||||
spoilerText: '',
|
||||
|
|
@ -350,11 +351,14 @@ const PostStatusForm = {
|
|||
nsfw: !!config.sensitiveByDefault,
|
||||
visibility: this.suggestedVisibility(),
|
||||
contentType: config.postContentType,
|
||||
language: this.suggestedLanguage(),
|
||||
language: postLanguage,
|
||||
poll: {},
|
||||
mediaDescriptions: {}
|
||||
}
|
||||
this.$refs.scopeselector.currentScope = this.newStatus.visibility
|
||||
const scopeselector = this.$refs.scopeselector
|
||||
if (scopeselector) {
|
||||
scopeselector.currentScope = this.newStatus.visibility
|
||||
}
|
||||
this.pollFormVisible = false
|
||||
this.$refs.mediaUpload && this.$refs.mediaUpload.clearFile()
|
||||
this.clearPollForm()
|
||||
|
|
|
|||
Loading…
Reference in a new issue