basic nav status counts

This commit is contained in:
Tim Bendt
2025-04-30 16:47:16 -04:00
parent 3a5cb7d5d3
commit 7a5b911414
14 changed files with 72 additions and 19 deletions

View File

@@ -1,8 +1,10 @@
from textual.widgets import Static
from rich.markdown import Markdown
import subprocess
def show_message(app, message_id: int) -> None:
"""Fetch and display the email message by ID."""
app.current_message_id = message_id
app.query_one("#main_content", Static).loading = True
try:
result = subprocess.run(
@@ -12,7 +14,6 @@ def show_message(app, message_id: int) -> None:
)
if result.returncode == 0:
# Render the email content as Markdown
from rich.markdown import Markdown
markdown_content = Markdown(result.stdout, justify=True)
app.query_one("#main_content", Static).loading = False
app.query_one("#main_content", Static).update(markdown_content)