mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-10-09 11:16:39 +00:00
refactor(ui-core): UiCore becomes MyMesh's Listener for ui-new
ui-new hands MyMesh the UI Core (UITaskBase::meshListener()). The Core applies the display filter, labels room posts, files history, keeps DM / channel / room unread and the queue count, and reports incoming messages and adverts as MessageArrived / AdvertHeard events. UITask now derives UITaskBase + UiCoreHost: it answers "is this conversation on screen" and keeps the selection after an insert, forwards not-yet-extracted parts (room login / admin, bot device actions, removal cleanup, shutdown), and turns events into alert / wake / sound, drained at the start and end of its loop(). Mesh callbacks no longer touch the display or buzzer. AbstractUITask is split into UITaskBase (lifecycle, link state, helpers) and the Listener glue ui-orig / ui-tiny keep using unchanged. Screenshot handler reaches ui_task directly instead of casting the Listener. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -326,7 +326,7 @@ void setup() {
|
||||
if (disp && the_mesh.getNodePrefs())
|
||||
disp->setBrightness(the_mesh.getNodePrefs()->display_brightness);
|
||||
ui_task.begin(disp, &sensors, the_mesh.getNodePrefs()); // still want to pass this in as dependency, as prefs might be moved
|
||||
the_mesh.setListener(&ui_task);
|
||||
the_mesh.setListener(ui_task.meshListener());
|
||||
#ifdef DISPLAY_HAS_BUSY_PUMP
|
||||
if (disp) disp->setBusyPumpFn(pumpRadioDuringDisplayBusyWait, nullptr);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user