Commit 2dc443b
committed
feat(chat): reimplement message search with chat block history support
Massive refactor of message search and chat history handling:
- Introduce three chat modes:
* DEFAULT_MODE: Normal chat display with latest messages
* SEARCH_MODE: In-message search functionality
* OLD_CHATBLOCK_MODE: Display messages from past chat blocks (earlier conversations)
- Handle chatBlocks from the past:
* Add observeMessagesForAnchor() to load historical chat blocks
* Add getChatBlocksContainingMessageId() DAO method for anchor navigation
* Support navigation to older messages when jumping to search results
- Unified search integration:
* Add performUnifiedSearch() API endpoint
* Integrate UnifiedSearchRepository into ChatViewModel
* Enable full-text message search across conversations
- UI/UX improvements:
* Add search bar and toolbar in ChatActivity
* Implement search result highlighting with SearchHighlightStyle
* Add loading indicators for search operations
* Support for theme-aware search UI components
- Message search infrastructure:
* Reimplement MessageSearchHelper with improved search logic
* Enhance search result handling in search mode
* Support search within threads and conversations
Affected components:
- ChatActivity: Added in-app search UI and mode switching
- ChatViewModel: Multi-mode message loading and search integration
- ChatRepository: New methods for historical message access
- OfflineFirstChatRepository: Chat block aware queries
- MessageSearchHelper/MessageSearchViewModel: Search implementation
- ConversationsListViewModel: Search result navigation
Co-authored by:
AI-assistant: Copilot 1.8.2 (Claude Sonnet 4.6)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>1 parent 520261e commit 2dc443b
31 files changed
Lines changed: 1427 additions & 372 deletions
File tree
- app/src
- main
- java/com/nextcloud/talk
- api
- chat
- data
- network
- viewmodels
- conversationlist
- ui
- viewmodels
- dagger/modules
- data
- database/dao
- source/local
- messagesearch
- models/domain
- repositories/unifiedsearch
- ui/chat
- utils
- bundle
- preview
- res
- layout
- values
- test/java/com/nextcloud/talk
- messagesearch
- test/fakes
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
451 | 452 | | |
452 | 453 | | |
453 | 454 | | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
454 | 466 | | |
455 | 467 | | |
456 | 468 | | |
| |||
Lines changed: 368 additions & 40 deletions
Large diffs are not rendered by default.
Lines changed: 16 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | | - | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
163 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
164 | 169 | | |
Lines changed: 90 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| 133 | + | |
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
| |||
283 | 285 | | |
284 | 286 | | |
285 | 287 | | |
286 | | - | |
| 288 | + | |
| 289 | + | |
287 | 290 | | |
288 | 291 | | |
289 | 292 | | |
290 | | - | |
291 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
292 | 297 | | |
293 | 298 | | |
294 | | - | |
| 299 | + | |
295 | 300 | | |
296 | | - | |
297 | | - | |
| 301 | + | |
| 302 | + | |
298 | 303 | | |
299 | 304 | | |
300 | 305 | | |
301 | 306 | | |
302 | 307 | | |
303 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
304 | 316 | | |
305 | 317 | | |
306 | 318 | | |
| |||
355 | 367 | | |
356 | 368 | | |
357 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
358 | 415 | | |
359 | 416 | | |
360 | 417 | | |
| |||
381 | 438 | | |
382 | 439 | | |
383 | 440 | | |
384 | | - | |
| 441 | + | |
385 | 442 | | |
386 | 443 | | |
387 | 444 | | |
| |||
990 | 1047 | | |
991 | 1048 | | |
992 | 1049 | | |
993 | | - | |
| 1050 | + | |
994 | 1051 | | |
995 | 1052 | | |
996 | 1053 | | |
| |||
1007 | 1064 | | |
1008 | 1065 | | |
1009 | 1066 | | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
1010 | 1092 | | |
1011 | 1093 | | |
1012 | 1094 | | |
| |||
0 commit comments