move and rename module

This commit is contained in:
Bendt
2025-12-18 14:00:54 -05:00
parent 37be42884f
commit fe65183fb7
33 changed files with 26 additions and 24 deletions

View File

@@ -0,0 +1,20 @@
def action_previous(app) -> None:
"""Show the previous email message by finding the next lower ID from the list of envelope IDs."""
try:
if app.reload_needed:
app.action_fetch_list()
ids = sorted(
(int(envelope["id"]) for envelope in app.all_envelopes), reverse=True
)
for envelope_id in ids:
if envelope_id < int(app.current_message_id):
app.current_message_id = envelope_id
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:
app.show_status(f"Error: {e}", severity="error")