From 9fb3eb86d51ed63e947e8071577ca66b78026525 Mon Sep 17 00:00:00 2001 From: Abdo Date: Fri, 28 Oct 2022 13:52:04 +0300 Subject: [PATCH] Add aqt.operations helper for col.update_notes() (#2145) --- qt/aqt/operations/note.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qt/aqt/operations/note.py b/qt/aqt/operations/note.py index c76971a4a..42b2bc950 100644 --- a/qt/aqt/operations/note.py +++ b/qt/aqt/operations/note.py @@ -26,6 +26,12 @@ def update_note(*, parent: QWidget, note: Note) -> CollectionOp[OpChanges]: return CollectionOp(parent, lambda col: col.update_note(note)) +def update_notes(*, parent: QWidget, notes: Sequence[Note]) -> CollectionOp[OpChanges]: + return CollectionOp(parent, lambda col: col.update_notes(notes)).success( + lambda _: tooltip(tr.browsing_cards_updated(count=len(notes))) + ) + + def remove_notes( *, parent: QWidget,