@social-mail/social-mail-client 1.2.200 → 1.2.201

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21895,13 +21895,19 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
21895
21895
  let q = this.entityService.query(MailboxContact).where({
21896
21896
  mailboxID,
21897
21897
  showBlocked
21898
- }, p => x => x.mailboxID === p.mailboxID && x.blocked === p.showBlocked).orderByDescending(x => x.dateUpdated);
21898
+ }, p => x => x.mailboxID === p.mailboxID && x.blocked === p.showBlocked);
21899
21899
  if (search) {
21900
- const likeSearch = `%${search}%`;
21900
+ const likeSearch = `${search}%`;
21901
21901
  q = q.where({
21902
21902
  search,
21903
21903
  likeSearch
21904
21904
  }, p => x => x.emailAddress.emailAddress === p.search || Sql.text.iLike(x.lastEmail.textBody, p.likeSearch) || Sql.text.iLike(x.lastEmail.subject, p.likeSearch) || Sql.text.iLike(x.emailAddress.name, p.likeSearch) || Sql.text.iLike(x.lastEmail.senderName, p.likeSearch));
21905
+ q = q.orderByDescending({
21906
+ search,
21907
+ likeSearch
21908
+ }, p => x => x.emailAddress.emailAddress === p.search || Sql.text.iLike(x.emailAddress.name, p.likeSearch)).thenByDescending(x => x.dateUpdated);
21909
+ } else {
21910
+ q = q.orderByDescending(x => x.dateUpdated);
21905
21911
  }
21906
21912
  return q.include(x => [x.emailAddress, x.lastEmail]).toPagedList({
21907
21913
  start,