updating the sort order of arrivals in Min

This commit is contained in:
2025-08-14 16:45:33 +02:00
parent 0d539cd470
commit 6d82dd9326

View File

@@ -262,6 +262,10 @@ class RMVApp(App):
departures = fetch_departures(self.current_id)
_, west, east = build_table_data(departures)
# Sortieren nach Minutenwert, wie im Lightmodus
west.sort(key=lambda row: int(row[2]) if row[2].isdigit() else 999)
east.sort(key=lambda row: int(row[2]) if row[2].isdigit() else 999)
self.update_table(self.table_west, west)
self.update_table(self.table_east, east)
except Exception as e:
@@ -270,7 +274,6 @@ class RMVApp(App):
def update_table(self, table: DataTable, rows):
"""Befüllt eine DataTable mit neuen Daten und Farbcodes"""
table.clear() # Nur Zeilen löschen, Spalten bleiben
for line, dest, mins in rows:
color_hex = line_colors.get(line)
if color_hex: