mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-06 04:06:12 +00:00
refactor(ui): share single KeyboardWidget instance across screens
Moves KeyboardWidget from a per-screen value member to a single instance owned by UITask, passed to SettingsScreen, QuickMsgScreen, and BotScreen as a pointer. Only one screen is ever active at a time, so the shared state is safe. Saves ~1.5 KB of always-resident heap. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
2d6d35192b
commit
c339dc7d97
@@ -24,6 +24,7 @@
|
||||
#include "../NodePrefs.h"
|
||||
#include "../Trail.h"
|
||||
#include "../Waypoint.h"
|
||||
#include "KeyboardWidget.h"
|
||||
|
||||
class UITask : public AbstractUITask {
|
||||
DisplayDriver* _display;
|
||||
@@ -43,6 +44,7 @@ class UITask : public AbstractUITask {
|
||||
bool _lock_seq_used; // true = suppress next back_btn CLICK (post-sequence release)
|
||||
char _alert[80];
|
||||
char _notif_mel_buf[220]; // persistent RTTTL buffer for custom notification melodies
|
||||
KeyboardWidget _kb; // shared across all screens — only one active at a time
|
||||
unsigned long _alert_expiry;
|
||||
int _msgcount;
|
||||
int _room_unread;
|
||||
|
||||
Reference in New Issue
Block a user