@bobfrankston/rmfmail 1.1.88 → 1.1.90

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/.commitmsg CHANGED
@@ -1,11 +1,7 @@
1
- Fix: highlighted row with an empty viewer (selection/preview desync)
1
+ Search history records live (no-Enter) searches too
2
2
 
3
- A list row could stay highlighted while the viewer showed "Select a
4
- message to read". releaseFocus() only un-selected the tracked focusedRow,
5
- so a stray .selected (multi-select remnant, or a row that kept the class
6
- through an incremental rerender) was left highlighted after the viewer
7
- had been cleared.
8
-
9
- releaseFocus() now strips every .selected row. focusRow() also sweeps
10
- stray .selected in single-select mode before highlighting its row, so
11
- the list can never show a highlight that doesn't match the viewer.
3
+ Search history only recorded on Enter, so a search typed and run
4
+ live ("Hoddie") never appeared in the history dropdown. Every executed
5
+ search is now recorded; recordSearchHistory() prunes any entry that is a
6
+ prefix of the new query, collapsing the keystroke progression ("Hod",
7
+ "Hodd") into the final term so it lands in history exactly once.
@@ -7823,7 +7823,7 @@ function recordSearchHistory(query) {
7823
7823
  const trimmed = query.trim();
7824
7824
  if (!trimmed) return;
7825
7825
  const cur = loadSearchHistory();
7826
- const filtered = cur.filter((q) => q !== trimmed);
7826
+ const filtered = cur.filter((q) => q !== trimmed && !trimmed.startsWith(q));
7827
7827
  filtered.unshift(trimmed);
7828
7828
  if (filtered.length > SEARCH_HISTORY_MAX) filtered.length = SEARCH_HISTORY_MAX;
7829
7829
  saveSearchHistory(filtered);
@@ -7917,7 +7917,7 @@ function doSearch(immediate = false) {
7917
7917
  { kind: "search", query, scope: effectiveScope, accountId: currentAccountId3, folderId: currentFolderId2, includeTrash },
7918
7918
  `Search: ${query}`
7919
7919
  );
7920
- if (immediate) recordSearchHistory(query);
7920
+ recordSearchHistory(query);
7921
7921
  }
7922
7922
  var currentAccountId3 = "";
7923
7923
  var currentFolderId2 = 0;