${escapeHtml(email.preview)}
` : "") openComposeWithInitial({ to, subject: email.subject, bodyHtml: body, focusToOnMount: false, focusBodyOnMount: true, }) }, [markEmailSeen, openComposeWithInitial] ) const handleRowActivate = useCallback( (email: Email) => { if (email.labels?.includes("scheduled")) return if (email.labels?.includes("drafts")) { openDraftInCompose(email) return } handleOpenEmail(email.id) }, [handleOpenEmail, openDraftInCompose] ) const viewModeIsRead = useMemo(() => { if (!openEmail) return true return readOverrides[openEmail.id] !== undefined ? readOverrides[openEmail.id]! : openEmail.read }, [openEmail, readOverrides]) const singleArchive = useCallback(() => { if (!openMailId) return mailActions.hideEmail(openMailId) goBack() }, [openMailId, goBack, mailActions]) const singleDelete = useCallback(() => { if (!openMailId) return mailActions.hideEmail(openMailId) goBack() }, [openMailId, goBack, mailActions]) const singleSpam = useCallback(() => { if (!openMailId) return mailActions.hideEmail(openMailId) goBack() }, [openMailId, goBack, mailActions]) const singleNotSpam = useCallback(() => { if (!openMailId) return mailActions.markNotSpam(openMailId) onSelectFolder?.("inbox") goBack() }, [openMailId, goBack, onSelectFolder, mailActions]) const singleToggleRead = useCallback(() => { if (!openMailId) return setReadOverrides((prev) => ({ ...prev, [openMailId]: !viewModeIsRead })) }, [openMailId, viewModeIsRead]) const singleMoveTo = useCallback( (targetId: string) => { if (!openMailId) return moveEmailsToTarget([openMailId], targetId) const isSystemHide = ["sent", "drafts", "spam", "trash"].includes(targetId) if (isSystemHide || targetId !== "inbox") { goBack() } }, [openMailId, goBack, moveEmailsToTarget] ) const handleNavigateToLabel = useCallback( (label: string) => { const folderId = sidebarNav.emailLabelToSidebarFolderId[label] ?? label onSelectFolder?.(folderId) }, [onSelectFolder, sidebarNav.emailLabelToSidebarFolderId] ) useEffect(() => { onFolderUnreadCountsChange?.(folderUnreadCounts) }, [folderUnreadCounts, onFolderUnreadCountsChange]) const listRowsDep = listEmails.map((e) => e.id).join(",") useEffect(() => { const root = listViewportRef.current if (!root) return const obs = new IntersectionObserver( (entries) => { for (const en of entries) { if (!en.isIntersecting) continue const id = (en.target as HTMLElement).dataset.emailRowId if (id) markEmailSeen(id) } }, { root, threshold: 0.12, rootMargin: "0px" } ) root.querySelectorAll{filteredEmails.length} message{filteredEmails.length !== 1 ? "s" : ""} {mobileUnreadCount > 0 && ` · ${mobileUnreadCount} non lu${mobileUnreadCount !== 1 ? "s" : ""}`}
Les messages de la liste « Envois programmés » seront envoyés à l'heure prévue pour chacun d'eux.
Aucun message planifié.
{email.preview}
Nouvelle date d'envoi
setRescheduleTarget((prev) => prev?.id === email.id ? { ...prev, value: e.target.value, panelOpen: true, } : prev ) } />Nouvelle date d'envoi {contextTargetIds.length > 1 ? ` (${contextTargetIds.length} messages)` : null}
setCmScheduledRescheduleValue(e.target.value) } onPointerDown={(e) => e.stopPropagation()} />