fix: _current_conv bei RowHighlighted asynchron laden (QR + Delete)

This commit is contained in:
2026-03-17 15:11:21 +01:00
parent 2b15a99dc4
commit 7c237836e8

View File

@@ -164,10 +164,18 @@ class MainScreen(Screen):
# ── Events ───────────────────────────────────────────────────────────────── # ── Events ─────────────────────────────────────────────────────────────────
def on_data_table_row_highlighted(self, event: DataTable.RowHighlighted) -> None: def on_data_table_row_highlighted(self, event: DataTable.RowHighlighted) -> None:
"""Cursor-Bewegung: conv_id sofort merken (für d-Taste etc.).""" """Cursor-Bewegung: conv_id und conv sofort merken (für d/t-Taste etc.)."""
conv_id = self._conv_id_map.get(event.cursor_row) conv_id = self._conv_id_map.get(event.cursor_row)
if conv_id: if conv_id:
self._current_conv_id = conv_id self._current_conv_id = conv_id
# _current_conv asynchron nachladen
asyncio.create_task(self._fetch_current_conv(conv_id))
async def _fetch_current_conv(self, conv_id: str) -> None:
try:
self._current_conv = await self._api.get_conversation(conv_id)
except Exception:
pass
async def on_data_table_row_selected(self, event: DataTable.RowSelected) -> None: async def on_data_table_row_selected(self, event: DataTable.RowSelected) -> None:
row_idx = event.cursor_row row_idx = event.cursor_row