Skip to content

Commit

Permalink
Fix: Truncate long note bodies in quick panel
Browse files Browse the repository at this point in the history
The note body in the quick panel was not truncated when it exceeded a certain length, making it difficult to read. This commit truncates the note body to 120 characters and appends an ellipsis if necessary.
  • Loading branch information
RedAtman committed Aug 7, 2024
1 parent 4378311 commit 9249a7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def show_quick_panel(first_sync: bool = False):
note,
note.title,
[
note.body,
note.body[:120] + "..." if len(note.body) > 120 else note.body,
# f"tags: {note.d.tags}",
], # type: ignore
f"version:{note.v} | update:{datetime.fromtimestamp(note.d.modificationDate).strftime('%Y-%m-%d %H:%M:%S')}",
Expand Down

0 comments on commit 9249a7d

Please sign in to comment.