feat(backend): allow search flagged in all folders if enabled in settings#1582
feat(backend): allow search flagged in all folders if enabled in settings#1582Shadow243 wants to merge 1 commit intocypht-org:masterfrom
Conversation
5a4f65c to
26bc417
Compare
| foreach (array_keys($all_folders) as $folder) { | ||
| $uids = $mailbox->search($folder, $filter, $terms, $sort, $reverse); | ||
| $headers = $mailbox->get_message_list($folder, $uids); | ||
| $uids = array_slice($uids, 0, $limit); |
There was a problem hiding this comment.
How do you apply the limit across folders? Limit is flagged per source, so it should be decreased when a folder returns some results.
|
@Shadow243 why is this still in draft? Isn't it ready for review? |
|
Brainstorming: There is often this trade off of search here (fast) vs search everywhere (slow). It's not just for flagged emails, but also for tags and general search. I wonder if we should generalize this? So the default is the quick search, and when relevant, add a link/button/option to extend this search to all folders (or something) "Did you find what you were looking for? Would you like to expand this search to all folders of this account or all folders of all accounts?" (or something like this) See also: #676 This is not a blocker for 2.5.0 but quite important, so I will put it for milestone 2.6 Let's discuss at our https://github.com/cypht-org/cypht/wiki/Monthly-Community-Meetings |
This PR introduces a new parameter that allows Cypht to search for flagged messages across all folders.
By default, the search is limited to the INBOX, which is lightweight and optimized for performance.
Enabling the new option allows a broader search across the entire server, but it's more resource-intensive.
Therefore, users should be aware of the performance implications before activating it.
Reported at https://avan.tech/item136195#threadId91599 as point 5