[FL-976] Removing lambdas (#1849)

* Removing lambdas...
* Wake the fk up, Gordon! We have a citadel to burn!
* Here comes the Nihilanth
* Lambda documentation

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Sergey Gavrilov
2022-10-09 03:38:29 +10:00
committed by GitHub
parent 981f7ff8b0
commit 31c0346adc
43 changed files with 1193 additions and 1007 deletions

View File

@@ -106,7 +106,9 @@ static void bt_hid_keynote_draw_callback(Canvas* canvas, void* context) {
static void bt_hid_keynote_process(BtHidKeynote* bt_hid_keynote, InputEvent* event) {
with_view_model(
bt_hid_keynote->view, (BtHidKeynoteModel * model) {
bt_hid_keynote->view,
BtHidKeynoteModel * model,
{
if(event->type == InputTypePress) {
if(event->key == InputKeyUp) {
model->up_pressed = true;
@@ -153,8 +155,8 @@ static void bt_hid_keynote_process(BtHidKeynote* bt_hid_keynote, InputEvent* eve
furi_hal_bt_hid_consumer_key_release(HID_CONSUMER_AC_BACK);
}
}
return true;
});
},
true);
}
static bool bt_hid_keynote_input_callback(InputEvent* event, void* context) {
@@ -197,8 +199,5 @@ View* bt_hid_keynote_get_view(BtHidKeynote* bt_hid_keynote) {
void bt_hid_keynote_set_connected_status(BtHidKeynote* bt_hid_keynote, bool connected) {
furi_assert(bt_hid_keynote);
with_view_model(
bt_hid_keynote->view, (BtHidKeynoteModel * model) {
model->connected = connected;
return true;
});
bt_hid_keynote->view, BtHidKeynoteModel * model, { model->connected = connected; }, true);
}