Add aqt.operations helper for col.update_notes() (#2145)

This commit is contained in:
Abdo 2022-10-28 13:52:04 +03:00 committed by GitHub
parent 68fa661b53
commit 9fb3eb86d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,6 +26,12 @@ def update_note(*, parent: QWidget, note: Note) -> CollectionOp[OpChanges]:
return CollectionOp(parent, lambda col: col.update_note(note)) 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( def remove_notes(
*, *,
parent: QWidget, parent: QWidget,