-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Point 1 More tests
testNotesWithTags
| result |
ressources addingNotesAndTagsTo: noteTakerContainer.
result := noteTakerContainer
notes: noteTakerContainer notes
withTags: (OrderedCollection new
add: (noteTakerContainer ensureTagNamed: 'test');
yourself).
self assert: result size equals: 0.
result := noteTakerContainer
notes: noteTakerContainer notes
withTags: (OrderedCollection new
add: ressources getTag1;
yourself).
self assert: result size equals: 1
Point 2: rename method
In addition notes:withTags: could be interpreted as a setter
-> rename it for example selectNotes:withTags:
Point 3: is argument really needed?
Question why the container is needed to get a collection of notes? Why does not work on its notes.
Why the method is not just selectWithTags:?
Ok the answer is probably here
filter
| filteredItems |
filteredItems := searchBar text
ifEmpty: [ self notes ]
ifNotEmpty: [ :pattern |
self model notesContentsMatching: pattern ].
filteredItems := filteredTagsSelection
ifEmpty: [ filteredItems ]
ifNotEmpty: [ :pattern |
self model
notes: filteredItems
withTags: filteredTagsSelection ].
self items: filteredItems
Metadata
Metadata
Assignees
Labels
No labels