fix: _current_conv bei RowHighlighted asynchron laden (QR + Delete)
This commit is contained in:
@@ -164,10 +164,18 @@ class MainScreen(Screen):
|
||||
# ── Events ─────────────────────────────────────────────────────────────────
|
||||
|
||||
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)
|
||||
if 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:
|
||||
row_idx = event.cursor_row
|
||||
|
||||
Reference in New Issue
Block a user