Closed laugengebaeck closed 3 years ago
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
packages/IMAPClient-Core.package/ICEndPoint.class/instance/testAccountWith..st | 1 | 0% | ||
packages/IMAPClient-Core.package/ICEmail.class/instance/retrieveBody.st | 9 | 0% | ||
<!-- | Total: | 10 | --> |
Totals | |
---|---|
Change from base Build 893267833: | -0.2% |
Covered Lines: | 1042 |
Relevant Lines: | 1381 |
We should maybe also invalidate the sorting when a new contact is added by the user, because otherwise this new contact might not be sorted into the right order.
Edit: This is done now.
Another thing we should think about before merging this pull request (we talked about that last week): Should we change the address book to use ICContacts internally? The current sorting method is quite ugly (and hard to understand) because it works by splitting strings.
Yeah, this is indeed ugly. We decided to pass Contacts as Strings in order to use addAllFirstUnlessAlreadyPresent:
(https://github.com/hpi-swa-teaching/IMAPClient/blob/develop/packages/IMAPClient-Core.package/ICAddressBook.class/instance/addEmail..st#L4). When they are passed as ICContacts every time you open the address book you attach all contacts to the existing address book (because their id is unique). But that decision was made before sorting, so dissolving that makes sense.
If that makes it simpler we should definitly change it. But then this should be done this week, as we are planning to merge on Monday at the lastest.
The tests requested by @sm1lla should be added now.
I decided not to change the ICAddressBook
to use ICContact
s since the PluggableTreeSpec
we use for displaying can only display the collection it is watching directly (without asString
). We could use a PluggableMultiColumnListSpec
or something like that (which would resolve that issue), but this seems to require a lot of complicated changes.
Can I merge this? (I would list Christian as the first author)
This closes #402.
UI of the ICAdressBookDialog now looks like this: