Save only if status has something to save

This commit is contained in:
tusooa 2023-03-12 15:19:48 -04:00
parent 2edf5fc9f6
commit dee38f7fe4
No known key found for this signature in database
GPG key ID: 42AEC43D48433C51

View file

@ -706,7 +706,11 @@ const PostStatusForm = {
return propsToNative(props)
},
saveDraft () {
if (!this.saveInhibited) {
if (!this.saveInhibited &&
(this.newStatus.status ||
this.newStatus.files?.length ||
this.newStatus.hasPoll
)) {
this.$store.dispatch('addOrSaveDraft', { draft: this.newStatus })
.then(id => {
if (this.newStatus.id !== id) {