diff options
Diffstat (limited to 'src/components/Composer/Composer.vue')
-rw-r--r-- | src/components/Composer/Composer.vue | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/Composer/Composer.vue b/src/components/Composer/Composer.vue index 0b43ce36..14b167df 100644 --- a/src/components/Composer/Composer.vue +++ b/src/components/Composer/Composer.vue @@ -169,13 +169,13 @@ export default { }, defaultVisibility: { type: String, - default: localStorage.getItem('social.lastPostType') || 'followers', + default: undefined, }, }, data() { return { statusContent: '', - visibility: this.defaultVisibility, + visibility: this.defaultVisibility || localStorage.getItem('social.lastPostType') || 'followers', loading: false, /** @type {Object<string, LocalAttachment>} */ attachments: {}, @@ -301,14 +301,14 @@ export default { * @param {import('../../types/Mastodon.js').Account} account */ prefillMessageWithMention(account) { - if (!this.statusIsEmpty) { + if (!this.statusIsEmpty || this.$refs.composerInput === undefined) { return } this.$refs.composerInput.innerHTML = ` <span class="mention" contenteditable="false"> <a href="${account.url}" target="_blank"> - <img src="${!account.acct.includes('@') ? generateUrl(`/avatar/${account.username}/32`) : generateUrl(`apps/social/api/v1/global/actor/avatar?id=${account.acct}`)}"/> + <img src="${account.avatar}"/> @${account.acct} </a> </span> ` @@ -413,6 +413,7 @@ export default { this.loading = false this.replyTo = null this.$refs.composerInput.innerText = '' + this.updateStatusContent() this.attachments = {} this.$store.dispatch('refreshTimeline') } |