Skip to content

Commit

Permalink
announcements: fix search
Browse files Browse the repository at this point in the history
  • Loading branch information
LinqLover committed Nov 21, 2024
1 parent 429ba63 commit 615bfaf
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
searching - conversation
previewMatch

^ TalkTextSearcher
pseudoMatchFor: self text
from: self
label: nil
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
accessing - conversation
searchableProperties

^ OrderedDictionary new
at: 'From' put: #author;
at: 'Date' put: #date;
at: 'Subject' put: #subject;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
accessing - conversation
visitBySearcher: aTextSearcher context: searchContext

self searchableProperties keysAndValuesDo: [:label :block | | propertyValue |
propertyValue := (block value: self) asString.
aTextSearcher visit: self label: label contents: propertyValue context: searchContext].

aTextSearcher visit: self contents: (self perform: aTextSearcher messageTextSelector) context: searchContext.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@
"openInNabble" : "ct 11/18/2024 21:23",
"openInPipermail" : "ct 11/18/2024 21:23",
"plainText" : "ct 11/18/2024 20:37",
"previewMatch" : "ct 11/19/2024 03:31",
"printOn:" : "ct 11/18/2024 20:49",
"rawText" : "ct 11/18/2024 03:46",
"richText" : "ct 11/18/2024 03:43",
"searchableProperties" : "ct 11/19/2024 03:30",
"selector" : "ct 11/18/2024 20:35",
"selector:" : "ct 11/18/2024 20:35",
"subject" : "ct 11/18/2024 03:12",
"subject:" : "ct 11/18/2024 03:12",
"text" : "ct 11/18/2024 20:50" } }
"text" : "ct 11/18/2024 20:50",
"visitBySearcher:context:" : "ct 11/19/2024 03:30" } }

0 comments on commit 615bfaf

Please sign in to comment.