diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2022-01-18 19:45:43 +0300 |
---|---|---|
committer | Richard Steinmetz <richard@steinmetz.cloud> | 2022-01-18 19:45:43 +0300 |
commit | b4cb3d085bd6739b0ff345fb8b2f1a3f8e98f7ef (patch) | |
tree | 80e3347368556a9ea29c49abfd5b56895556d4b9 /src/util | |
parent | db5fb32ee2e5db815d1446aaf0d814a2e08c5521 (diff) |
Fix syncing priority inbox
Fix #4925
New and changed envelopes will now show up properly after syncing the
priority inbox.
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/priorityInbox.js | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/util/priorityInbox.js b/src/util/priorityInbox.js new file mode 100644 index 000000000..e9e5a8b3e --- /dev/null +++ b/src/util/priorityInbox.js @@ -0,0 +1,43 @@ +/** + * @copyright Copyright (c) 2022 Richard Steinmetz <richard@steinmetz.cloud> + * + * @author Richard Steinmetz <richard@steinmetz.cloud> + * + * @license AGPL-3.0-or-later + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +/** Search query for important and unread messages inside priority inbox */ +export const priorityImportantQuery = 'is:pi-important' + +/** Search query for starred messages inside priority inbox */ +export const priorityStarredQuery = 'is:pi-starred' + +/** Search query for other messages inside priority inbox */ +export const priorityOtherQuery = 'is:pi-other' + +/** + * Return an array of all search queries inside the priority inbox + * + * @returns {(string)[]} + */ +export function getPrioritySearchQueries() { + return [ + priorityImportantQuery, + priorityStarredQuery, + priorityOtherQuery, + ] +} |