Skip to content

Commit ed63e0c

Browse files
committed
Improve MailReaderPresenter>>read:
1 parent f4124af commit ed63e0c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Chapters/MailApp/MailApp.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -469,11 +469,11 @@ MailReaderPresenter >> defaultLayout
469469
As mentioned before, we assume that instances of `MailReaderPresenter` will be told to update themselves. `read:` is the message to tell them.
470470

471471
```
472-
MailReaderPresenter >> read: email
472+
MailReaderPresenter >> read: folderOrEmail
473473
474-
email
475-
ifNil: [ self updateLayoutForNoEmail ]
476-
ifNotNil: [ self updateLayoutForEmail: email ]
474+
(folderOrEmail isNotNil and: [ folderOrEmail isEmail ])
475+
ifTrue: [ self updateLayoutForEmail: folderOrEmail ]
476+
ifFalse: [ self updateLayoutForNoEmail ]
477477
```
478478

479479
The method `read:` delegates to the methods that do the actual work.

0 commit comments

Comments
 (0)