mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Viewer/Content server: Fix history for completion popups such as search bars not being stored correctly. Fixes #1847976 [feature request: viewer 4 search history as in viewer 3](https://bugs.launchpad.net/calibre/+bug/1847976)
This commit is contained in:
parent
caad54863b
commit
c0acccde24
@ -83,7 +83,7 @@ def create_search_bar(action, name, tooltip=None, placeholder=None, button=None,
|
||||
items = local_storage().get(history_name) or v'[]'
|
||||
idx = items.indexOf(text)
|
||||
if idx > -1:
|
||||
items = items.splice(idx, 1)
|
||||
items.splice(idx, 1)
|
||||
items.unshift(text)
|
||||
local_storage().set(history_name, uniq(items[:history_size]))
|
||||
update_completion_items()
|
||||
|
Loading…
x
Reference in New Issue
Block a user