Fixed search for normal importance messages

master
M66B 2 weeks ago
parent c4f39047b4
commit 93db28e5be

@ -795,7 +795,8 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
}
if (criteria.with_importance != null)
if (!Objects.equals(message.importance, criteria.with_importance))
if (!Objects.equals(message.importance, criteria.with_importance) &&
!(EntityMessage.PRIORITIY_NORMAL.equals(criteria.with_importance) && message.importance == null))
return false;
if (criteria.with_encrypted) {

@ -392,7 +392,7 @@ public interface DaoMessage {
" AND (NOT :unseen OR NOT ui_seen)" +
" AND (NOT :flagged OR ui_flagged)" +
" AND (NOT :hidden OR NOT ui_snoozed IS NULL OR ui_unsnoozed)" +
" AND (:importance IS NULL OR importance = :importance)" +
" AND (:importance IS NULL OR importance = :importance OR (:importance = 1 AND importance IS NULL))" +
" AND (NOT :encrypted OR ui_encrypt > 0)" +
" AND (NOT :with_attachments OR attachments > 0)" +
" AND (NOT :with_notes OR NOT `notes` IS NULL)" +

Loading…
Cancel
Save