mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
Add aqt.operations helper for col.update_notes() (#2145)
This commit is contained in:
parent
68fa661b53
commit
9fb3eb86d5
1 changed files with 6 additions and 0 deletions
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue