Select a mailbox on click, show its email IDs
We'll eventually want to populate them.
This commit is contained in:
parent
656495904b
commit
ee872f6985
5 changed files with 80 additions and 19 deletions
11
src/App.tsx
11
src/App.tsx
|
@ -59,7 +59,12 @@ class App extends React.Component<AppProps, AppState> {
|
|||
}
|
||||
|
||||
onMailboxSelect(mailboxId: string) {
|
||||
console.log("Mailbox", mailboxId);
|
||||
if (!this.state.account) return;
|
||||
this.client.emailList(this.state.account.id, mailboxId, []);
|
||||
this.setState({
|
||||
...this.state,
|
||||
mailbox: this.client.mailbox(this.state.account.id, mailboxId),
|
||||
});
|
||||
}
|
||||
|
||||
// Load up auth credentials from the local store
|
||||
|
@ -113,7 +118,9 @@ class App extends React.Component<AppProps, AppState> {
|
|||
accounts={this.state.accounts}
|
||||
client={this.client}
|
||||
mailbox={this.state.mailbox}
|
||||
onMailboxSelect={this.onMailboxSelect}
|
||||
onMailboxSelect={(m) => {
|
||||
this.onMailboxSelect(m);
|
||||
}}
|
||||
/>
|
||||
<AuthModal
|
||||
show={this.client.state.session == null}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue