mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-22 16:46:28 +01:00
Fix one-char space inserted when replying to own posts
This commit is contained in:
parent
d0579a57d6
commit
1c18184ef4
1 changed files with 9 additions and 5 deletions
|
@ -93,11 +93,15 @@ function Compose({
|
|||
replyToStatus.account.acct,
|
||||
...replyToStatus.mentions.map((m) => m.acct),
|
||||
]);
|
||||
textareaRef.current.value = `${[...mentions]
|
||||
.filter((m) => m !== currentAccountInfo.acct) // Excluding self
|
||||
const allMentions = [...mentions].filter(
|
||||
(m) => m !== currentAccountInfo.acct,
|
||||
);
|
||||
if (allMentions.length > 0) {
|
||||
textareaRef.current.value = `${allMentions
|
||||
.map((m) => `@${m}`)
|
||||
.join(' ')} `;
|
||||
textareaRef.current.dispatchEvent(new Event('input'));
|
||||
}
|
||||
textareaRef.current.focus();
|
||||
}
|
||||
setVisibility(visibility);
|
||||
|
|
Loading…
Reference in a new issue