This commit is contained in:
Kovid Goyal 2017-05-02 09:54:11 +05:30
parent 71d9ac0adc
commit a541776fb2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 6 deletions

View File

@ -20,13 +20,13 @@ def implementation(db, notify_changes, action, *args):
name, val = args
db.saved_search_add(name, val)
if notify_changes is not None:
notify_changes(saved_searches([('add', name)]))
notify_changes(saved_searches(added=(name,)))
return
if action == 'remove':
name = args[0]
db.saved_search_delete(name)
if notify_changes is not None:
notify_changes(saved_searches([('remove', name)]))
notify_changes(saved_searches(removed=(name,)))
return

View File

@ -27,7 +27,5 @@ def metadata(book_ids):
pass
def saved_searches(changes):
for change_type, saved_search_name in changes:
# change_type is one of 'add' or 'remove'
pass
def saved_searches(added=(), removed=()):
pass