BT string in desktop_lock_menu naming depent from BT ON|OFF

This commit is contained in:
Dmitry422
2026-02-12 17:27:28 +07:00
parent 808774c05f
commit a98c610f6d
3 changed files with 16 additions and 1 deletions

View File

@@ -40,6 +40,14 @@ void desktop_lock_menu_set_stealth_mode_state(DesktopLockMenuView* lock_menu, bo
true);
}
void desktop_lock_menu_set_bt_mode_state(DesktopLockMenuView* lock_menu, bool bt_mode) {
with_view_model(
lock_menu->view,
DesktopLockMenuViewModel * model,
{ model->bt_mode = bt_mode; },
true);
}
void desktop_lock_menu_set_idx(DesktopLockMenuView* lock_menu, uint8_t idx) {
furi_assert(idx < DesktopLockMenuIndexTotalCount);
with_view_model(
@@ -59,7 +67,11 @@ void desktop_lock_menu_draw_callback(Canvas* canvas, void* model) {
//if(i == DesktopLockMenuIndexLock) {
if(i == DesktopLockMenuIndexBt) {
str = "Bluetooth On/Off";
if(m->bt_mode) {
str = "Bluetooth OFF";
} else {
str = "Bluetooth ON";
}
} else if(i == DesktopLockMenuIndexStealth) {
if(m->stealth_mode) {
str = "Unmute";