mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-12 01:18:31 +02:00
Track found entry count and remove incorrect modified stat logic
This commit is contained in:
parent
d341f3240c
commit
0c439200f4
1 changed files with 3 additions and 4 deletions
|
@ -85,13 +85,13 @@ def run(args: "Namespace"):
|
|||
|
||||
# If not append mode, then we're in search mode (only 2 modes exist)
|
||||
search_mode(**kwargs)
|
||||
_print_entries_found_count(len(journal), args)
|
||||
entries_found_count = len(journal)
|
||||
_print_entries_found_count(entries_found_count, args)
|
||||
|
||||
# Actions
|
||||
_perform_actions_on_search_results(**kwargs)
|
||||
|
||||
|
||||
if len(journal.entries) != 0 and _has_action_args(args):
|
||||
if entries_found_count != 0 and _has_action_args(args):
|
||||
_print_edited_summary(journal, old_stats)
|
||||
else:
|
||||
# display only occurs if no other action occurs
|
||||
|
@ -328,7 +328,6 @@ def _print_edited_summary(
|
|||
"deleted": old_stats["count"] - len(journal),
|
||||
"modified": len([e for e in journal.entries if e.modified]),
|
||||
}
|
||||
stats["modified"] -= stats["added"]
|
||||
msgs = []
|
||||
|
||||
if stats["added"] > 0:
|
||||
|
|
Loading…
Add table
Reference in a new issue