refactor: one place each for "in view" and the keyboard's backspace

ui-new's messagesInView() and ui-lvgl's threadInView() hold the
lit-and-unlocked test the viewing checks repeated; the keyboard's three
copies of the backspace call deleteBeforeCursor(). A stale comment on the
cursor-mode hint goes, onDisplayOn() sits after the view helpers it calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-08 23:58:52 +02:00
co-authored by Claude Opus 5.5
parent 9e24abcbeb
commit d901a58424
7 changed files with 31 additions and 43 deletions
+3 -2
View File
@@ -3469,8 +3469,9 @@ void MyMesh::loop() {
if ((dirty_contacts_expiry && millisHasNowPassed(dirty_contacts_expiry))
|| (dirty_paths_expiry && millisHasNowPassed(dirty_paths_expiry))) {
if (millis() - _last_input_ms < USER_QUIET_MILLIS) {
if (dirty_contacts_expiry) dirty_contacts_expiry = futureMillis(LAZY_CONTACTS_WRITE_DELAY);
if (dirty_paths_expiry) dirty_paths_expiry = futureMillis(LAZY_CONTACTS_WRITE_DELAY);
unsigned long later = futureMillis(LAZY_CONTACTS_WRITE_DELAY);
if (dirty_contacts_expiry) dirty_contacts_expiry = later;
if (dirty_paths_expiry) dirty_paths_expiry = later;
} else {
saveContacts();
dirty_contacts_expiry = dirty_paths_expiry = 0;