diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index 617996a5..52b69fd1 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -281,8 +281,6 @@ const PostStatusForm = {
if (this.preview) this.previewStatus()
},
async postStatus (event, newStatus, opts = {}) {
- const { sensitiveIfSubject } = this.$store.getters.mergedConfig
-
if (this.posting && !this.optimisticPosting) { return }
if (this.disableSubmit) { return }
if (this.emojiInputShown) { return }
@@ -318,7 +316,7 @@ const PostStatusForm = {
status: newStatus.status,
spoilerText: newStatus.spoilerText || null,
visibility: newStatus.visibility,
- sensitive: (newStatus.nsfw || (sensitiveIfSubject && newStatus.spoilerText)),
+ sensitive: newStatus.nsfw,
media: newStatus.files,
store: this.$store,
inReplyToStatusId: this.replyTo,
@@ -392,6 +390,10 @@ const PostStatusForm = {
},
addMediaFile (fileInfo) {
this.newStatus.files.push(fileInfo)
+
+ if (this.newStatus.sensitiveIfSubject && this.newStatus.spoilerText !== '') {
+ this.newStatus.nsfw = true
+ }
this.$emit('resize', { delayed: true })
},
removeMediaFile (fileInfo) {
@@ -468,6 +470,11 @@ const PostStatusForm = {
this.resize(this.$refs['textarea'])
})
},
+ onSubjectInput (e) {
+ if (this.newStatus.sensitiveIfSubject) {
+ this.newStatus.nsfw = true
+ }
+ },
resize (e) {
const target = e.target || e
if (!(target instanceof window.Element)) { return }
diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue
index 62613bd1..4824b723 100644
--- a/src/components/post_status_form/post_status_form.vue
+++ b/src/components/post_status_form/post_status_form.vue
@@ -124,8 +124,18 @@
:disabled="posting && !optimisticPosting"
size="1"
class="form-post-subject"
+ @input="onSubjectInput"
>
+
+ {{ $t('post_status.media_not_sensitive_warning') }}
+