Skip to content

Commit 3b90c90

Browse files
committed
Add missing methods on MailAccountPresenter
1 parent 21ff4ae commit 3b90c90

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

Chapters/Menus/Menus.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,40 @@ MailClientPresenter >> fetchMail
207207
self modelChanged
208208
```
209209

210+
The last four methods above send messages to `account`, which is bound to a `MailAccountPresenter`. The corresponding methods were not implemented yet, so we do it now.
211+
212+
```
213+
MailAccountPresenter >> saveAsDraft: draftEmail
214+
215+
self model saveAsDraft: draftEmail.
216+
self modelChanged
217+
```
218+
219+
```
220+
MailAccountPresenter >> deleteMail
221+
222+
| pathIndexes folder email |
223+
pathIndexes := foldersAndEmails selection selectedPath.
224+
folder := foldersAndEmails itemAtPath: (pathIndexes copyFrom: 1 to: 1).
225+
email := foldersAndEmails itemAtPath: pathIndexes.
226+
self model delete: email.
227+
self modelChanged
228+
```
229+
230+
```
231+
MailAccountPresenter >> sendMail: draftEmail
232+
233+
self model send: draftEmail.
234+
self modelChanged
235+
```
236+
237+
```
238+
MailAccountPresenter >> fetchMail
239+
240+
self model fetchMail.
241+
self modelChanged
242+
```
243+
210244
It is time to try it out. To see the menubar in action, let's open a window with:
211245

212246
```

0 commit comments

Comments
 (0)