Split email cache into full content and stubs.

This also introduces status for in-flight requests to avoid perpetual,
unnecessary loops of change-the-re-get-data.
This commit is contained in:
Eli Ribble 2024-08-28 19:25:20 -07:00
parent fb53a7506f
commit 4e1922c5fa
8 changed files with 219 additions and 47 deletions

View file

@ -4,7 +4,7 @@ import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col";
import AccountList from "./AccountList";
import EmailList from "./EmailList";
import EmailArea from "./EmailArea";
import MailboxList from "./MailboxList";
import Client from "./client/Client";
import { AccountIdMap, IAccount, IEmail, IMailbox } from "./client/types";
@ -14,6 +14,7 @@ type TopProps = {
accounts: AccountIdMap;
client: Client;
email: IEmail | null;
emailId: string;
mailbox: IMailbox | null;
};
@ -32,9 +33,11 @@ const AppLayout: React.FC<TopProps> = (props) => {
<MailboxList account={props.account} client={props.client} />
</Col>
<Col lg="11">
<EmailList
<EmailArea
account={props.account}
client={props.client}
email={props.email}
emailId={props.emailId}
mailbox={props.mailbox}
/>
</Col>