working good state

This commit is contained in:
Tim Bendt
2025-05-01 11:59:28 -04:00
parent 7a5b911414
commit 1f75a03553
20 changed files with 173 additions and 78 deletions

View File

@@ -1,11 +1,11 @@
from textual.widgets import Static
import subprocess
def action_previous(app) -> None:
"""Show the previous email message by finding the next lower ID from the list of envelope IDs."""
try:
result = subprocess.run(
["himalaya", "envelope", "list", "-o", "json"],
["himalaya", "envelope", "list", "-o", "json", "-s", "9999"],
capture_output=True,
text=True
)
@@ -19,6 +19,7 @@ def action_previous(app) -> None:
app.show_message(app.current_message_id)
return
app.show_status("No older messages found.", severity="warning")
app.action_oldest()
else:
app.show_status("Failed to fetch envelope list.", severity="error")
except Exception as e: