@bobfrankston/rmfmail 1.0.535 → 1.0.537
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.
- package/client/app.js +26 -21
- package/client/app.js.map +1 -1
- package/client/app.ts +21 -21
- package/docs/contacts.md +6 -1
- package/package.json +1 -1
- package/packages/mailx-store/db.d.ts.map +1 -1
- package/packages/mailx-store/db.js +7 -1
- package/packages/mailx-store/db.js.map +1 -1
- package/packages/mailx-store/db.ts +7 -1
- package/packages/mailx-store-web/db.d.ts.map +1 -1
- package/packages/mailx-store-web/db.js +5 -1
- package/packages/mailx-store-web/db.js.map +1 -1
- package/packages/mailx-store-web/db.ts +5 -1
|
@@ -540,8 +540,12 @@ export class WebMailxDB {
|
|
|
540
540
|
// "idb:<acct>/<folder>/<uid>" means the body is cached in IndexedDB via
|
|
541
541
|
// WebMessageStore. Anything else (NULL, "", "gmail:<id>", legacy paths)
|
|
542
542
|
// still needs fetching.
|
|
543
|
+
// Prefetch order: smallest first, NULL/0 sizes last, recent within
|
|
544
|
+
// tiebreak. Matches the desktop store — short notification mails
|
|
545
|
+
// dominate the cache fill on slow Android networks instead of one
|
|
546
|
+
// multi-megabyte attachment monopolizing bandwidth.
|
|
543
547
|
return this.all(
|
|
544
|
-
"SELECT uid, folder_id as folderId FROM messages WHERE account_id = ? AND (body_path IS NULL OR body_path NOT LIKE 'idb:%') ORDER BY date DESC LIMIT ?",
|
|
548
|
+
"SELECT uid, folder_id as folderId FROM messages WHERE account_id = ? AND (body_path IS NULL OR body_path NOT LIKE 'idb:%') ORDER BY (size IS NULL OR size = 0), size ASC, date DESC LIMIT ?",
|
|
545
549
|
[accountId, limit]);
|
|
546
550
|
}
|
|
547
551
|
|