@bobfrankston/rmfmail 1.2.34 → 1.2.36

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.
@@ -3116,7 +3116,7 @@ function initMessageList(handler) {
3116
3116
  body.addEventListener("scroll", () => {
3117
3117
  if (loading)
3118
3118
  return;
3119
- const nearBottom = body.scrollHeight - body.scrollTop - body.clientHeight < 200;
3119
+ const nearBottom = body.scrollHeight - body.scrollTop - body.clientHeight < 1e3;
3120
3120
  if (nearBottom) {
3121
3121
  if (currentPage * 50 < totalMessages) {
3122
3122
  loadMoreMessages();
@@ -8827,6 +8827,7 @@ function doSearch(immediate = false) {
8827
8827
  var currentAccountId3 = "";
8828
8828
  var currentFolderId2 = 0;
8829
8829
  var reloadDebounceTimer = null;
8830
+ var lastListReloadAt = 0;
8830
8831
  searchInput?.addEventListener("input", () => {
8831
8832
  clearTimeout(searchTimeout);
8832
8833
  if (serverSearchTimer) {
@@ -9249,11 +9250,17 @@ onWsEvent((event) => {
9249
9250
  case "folderCountsChanged": {
9250
9251
  updateFolderCounts();
9251
9252
  updateNewMessageCount();
9253
+ const nowMs = Date.now();
9254
+ if (nowMs - lastListReloadAt > 1500) {
9255
+ lastListReloadAt = nowMs;
9256
+ reloadCurrentFolder();
9257
+ }
9252
9258
  if (reloadDebounceTimer) clearTimeout(reloadDebounceTimer);
9253
9259
  reloadDebounceTimer = setTimeout(() => {
9254
9260
  reloadDebounceTimer = null;
9261
+ lastListReloadAt = Date.now();
9255
9262
  reloadCurrentFolder();
9256
- }, 2e3);
9263
+ }, 1500);
9257
9264
  hideAlert();
9258
9265
  const syncBtn = document.getElementById("btn-sync");
9259
9266
  if (syncBtn) {