mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-21 05:28:31 +02:00
Use more performant deletion
Co-authored-by: Fabio <788002+justdoit176@users.noreply.github.com>
This commit is contained in:
parent
26ec7fc5c6
commit
a60d3f9fdb
1 changed files with 2 additions and 3 deletions
|
@ -236,9 +236,8 @@ class Journal:
|
|||
|
||||
def delete_entries(self, entries_to_delete):
|
||||
"""Deletes specific entries from a journal."""
|
||||
self.entries = [
|
||||
entry for entry in self.entries if entry not in entries_to_delete
|
||||
]
|
||||
for entry in entries_to_delete:
|
||||
self.entries.remove(entry)
|
||||
|
||||
def prompt_delete_entries(self):
|
||||
"""Prompts for deletion of each of the entries in a journal.
|
||||
|
|
Loading…
Add table
Reference in a new issue