Skip to content

Commit

Permalink
More TUI
Browse files Browse the repository at this point in the history
  • Loading branch information
wsanchez committed Nov 3, 2023
1 parent dbacd0e commit f64e3b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/transmissions/run/_application.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from collections.abc import Iterable
from typing import ClassVar, cast

from arrow import get as makeArrow
from textual.app import App, ComposeResult
from textual.reactive import reactive
from textual.screen import Screen
Expand Down Expand Up @@ -31,6 +32,8 @@ def transmissionKey(transmission: Transmission) -> str:
def transmissionAsTuple(
key: str, transmission: Transmission
) -> TransmissionTuple:
startTime = makeArrow(transmission.startTime).to("US/Pacific")

if transmission.duration is None:
duration = None
else:
Expand All @@ -42,7 +45,7 @@ def transmissionAsTuple(
transmission.station,
transmission.system,
transmission.channel,
str(transmission.startTime),
startTime.format("ddd MM/DD HH:mm:ss"),
duration,
str(transmission.path),
transmission.sha256,
Expand Down
3 changes: 1 addition & 2 deletions src/transmissions/run/_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,7 @@ def application(ctx: Context) -> None:
"""

async def app(store: TXDataStore) -> None:
transmissions = frozenset(await store.transmissions())
app = TransmissionsApp(transmissions)
app = TransmissionsApp(await store.transmissions())
app.run()

run(ctx, app, reactor=asyncioReactor)

0 comments on commit f64e3b0

Please sign in to comment.