mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 23:08:11 +00:00
Settings › Radio and Tools › Repeater had near-identical preset-picker logic (name/list-index lookup, save/delete, popup build, selection handling) plus their own copy of the nearest-bandwidth search — only the target fields (companion params vs. dedicated repeater profile) and the apply call differed. Extract the shared logic into RadioPresetPicker (a Target of field pointers + a Result the screen acts on), with no dependency on UITask so each screen keeps its own apply/dirty/keyboard/alert handling. Move the nearest-bandwidth search to nearestBwIndex() in RadioPresets.h. Removes ~6 duplicated methods and 4 state fields from each screen. Verified: WioTrackerL1_companion_solo_dual builds clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>