Improve caption editor usability, new 'add attachment' affordance
This commit is contained in:
parent
ac1a6d197a
commit
0de54e125c
14 changed files with 224 additions and 61 deletions
|
@ -389,7 +389,9 @@ function getImageDimensions(attachment: AttachmentType): DimensionsType {
|
|||
};
|
||||
}
|
||||
|
||||
function areAllAttachmentsVisual(attachments?: Array<AttachmentType>): boolean {
|
||||
export function areAllAttachmentsVisual(
|
||||
attachments?: Array<AttachmentType>
|
||||
): boolean {
|
||||
if (!attachments) {
|
||||
return false;
|
||||
}
|
||||
|
@ -397,7 +399,7 @@ function areAllAttachmentsVisual(attachments?: Array<AttachmentType>): boolean {
|
|||
const max = attachments.length;
|
||||
for (let i = 0; i < max; i += 1) {
|
||||
const attachment = attachments[i];
|
||||
if (!isImageAttachment(attachment) || !isVideoAttachment(attachment)) {
|
||||
if (!isImageAttachment(attachment) && !isVideoAttachment(attachment)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue