mirror of
https://github.com/torlando-tech/pyxis.git
synced 2026-09-25 06:04:51 +00:00
refresh() unconditionally ran lv_obj_clean(_list) and recreated 5-7 LVGL objects per row on every call - every navigation back to Messages, every 750ms coalesced inbound batch, and the periodic name-resolution sweep - even when nothing had changed. With the store read now O(1) (index preview cache), that widget churn was the remaining gap vs NomadNet / Network / Maps, which build once and just unhide. refresh() now gathers row data first (index preview + hash + unread, no message-file I/O) and diffs it against the rendered rows; the rebuild only happens when data actually changes. Rows keep focus-group membership and the screen keeps its scroll position on the no-change path. The per-refresh 'Found N conversations' log drops from INFO to DEBUG (serial output under the LVGL lock stalls the render task). get_conversations() ordering is deterministic (last_activity desc with peer-hash tie-break), so the index-aligned comparison is stable.