basic nav status counts
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user