enhance(frontend): better condition for posting and displaying Notes (#13670)

* enhance(frontend): better condition for posting and displaying Notes

* Update CHANGELOG.md
This commit is contained in:
zyoshoka 2024-04-07 21:16:37 +09:00 committed by GitHub
parent 959cc8ff37
commit 960c4df48e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 2 deletions

View file

@ -253,7 +253,13 @@ const maxTextLength = computed((): number => {
const canPost = computed((): boolean => {
return !props.mock && !posting.value && !posted.value &&
(1 <= textLength.value || 1 <= files.value.length || !!poll.value || !!props.renote) &&
(
1 <= textLength.value ||
1 <= files.value.length ||
poll.value != null ||
props.renote != null ||
(props.reply != null && quoteId.value != null)
) &&
(textLength.value <= maxTextLength.value) &&
(!poll.value || poll.value.choices.length >= 2);
});