mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
Merge remote-tracking branch 'OFW/dev' into dev
This commit is contained in:
@@ -321,8 +321,7 @@ void button_menu_reset(ButtonMenu* button_menu) {
|
||||
void button_menu_set_header(ButtonMenu* button_menu, const char* header) {
|
||||
furi_check(button_menu);
|
||||
|
||||
with_view_model(
|
||||
button_menu->view, ButtonMenuModel * model, { model->header = header; }, true);
|
||||
with_view_model(button_menu->view, ButtonMenuModel * model, { model->header = header; }, true);
|
||||
}
|
||||
|
||||
ButtonMenuItem* button_menu_add_item(
|
||||
|
||||
@@ -868,6 +868,5 @@ void byte_input_set_result_callback(
|
||||
void byte_input_set_header_text(ByteInput* byte_input, const char* text) {
|
||||
furi_check(byte_input);
|
||||
|
||||
with_view_model(
|
||||
byte_input->view, ByteInputModel * model, { model->header = text; }, true);
|
||||
with_view_model(byte_input->view, ByteInputModel * model, { model->header = text; }, true);
|
||||
}
|
||||
|
||||
@@ -257,20 +257,17 @@ void dialog_ex_set_icon(DialogEx* dialog_ex, uint8_t x, uint8_t y, const Icon* i
|
||||
|
||||
void dialog_ex_set_left_button_text(DialogEx* dialog_ex, const char* text) {
|
||||
furi_check(dialog_ex);
|
||||
with_view_model(
|
||||
dialog_ex->view, DialogExModel * model, { model->left_text = text; }, true);
|
||||
with_view_model(dialog_ex->view, DialogExModel * model, { model->left_text = text; }, true);
|
||||
}
|
||||
|
||||
void dialog_ex_set_center_button_text(DialogEx* dialog_ex, const char* text) {
|
||||
furi_check(dialog_ex);
|
||||
with_view_model(
|
||||
dialog_ex->view, DialogExModel * model, { model->center_text = text; }, true);
|
||||
with_view_model(dialog_ex->view, DialogExModel * model, { model->center_text = text; }, true);
|
||||
}
|
||||
|
||||
void dialog_ex_set_right_button_text(DialogEx* dialog_ex, const char* text) {
|
||||
furi_check(dialog_ex);
|
||||
with_view_model(
|
||||
dialog_ex->view, DialogExModel * model, { model->right_text = text; }, true);
|
||||
with_view_model(dialog_ex->view, DialogExModel * model, { model->right_text = text; }, true);
|
||||
}
|
||||
|
||||
void dialog_ex_reset(DialogEx* dialog_ex) {
|
||||
|
||||
@@ -174,15 +174,13 @@ static void browser_long_load_cb(void* context);
|
||||
static void file_browser_scroll_timer_callback(void* context) {
|
||||
furi_check(context);
|
||||
FileBrowser* browser = context;
|
||||
with_view_model(
|
||||
browser->view, FileBrowserModel * model, { model->scroll_counter++; }, true);
|
||||
with_view_model(browser->view, FileBrowserModel * model, { model->scroll_counter++; }, true);
|
||||
}
|
||||
|
||||
static void file_browser_view_enter_callback(void* context) {
|
||||
furi_check(context);
|
||||
FileBrowser* browser = context;
|
||||
with_view_model(
|
||||
browser->view, FileBrowserModel * model, { model->scroll_counter = 0; }, true);
|
||||
with_view_model(browser->view, FileBrowserModel * model, { model->scroll_counter = 0; }, true);
|
||||
furi_timer_start(browser->scroll_timer, SCROLL_INTERVAL);
|
||||
}
|
||||
|
||||
|
||||
@@ -149,8 +149,7 @@ void menu_free(Menu* menu) {
|
||||
furi_check(menu);
|
||||
|
||||
menu_reset(menu);
|
||||
with_view_model(
|
||||
menu->view, MenuModel * model, { MenuItemArray_clear(model->items); }, false);
|
||||
with_view_model(menu->view, MenuModel * model, { MenuItemArray_clear(model->items); }, false);
|
||||
view_free(menu->view);
|
||||
|
||||
free(menu);
|
||||
|
||||
@@ -355,13 +355,11 @@ void text_box_set_text(TextBox* text_box, const char* text) {
|
||||
void text_box_set_font(TextBox* text_box, TextBoxFont font) {
|
||||
furi_check(text_box);
|
||||
|
||||
with_view_model(
|
||||
text_box->view, TextBoxModel * model, { model->font = font; }, true);
|
||||
with_view_model(text_box->view, TextBoxModel * model, { model->font = font; }, true);
|
||||
}
|
||||
|
||||
void text_box_set_focus(TextBox* text_box, TextBoxFocus focus) {
|
||||
furi_check(text_box);
|
||||
|
||||
with_view_model(
|
||||
text_box->view, TextBoxModel * model, { model->focus = focus; }, true);
|
||||
with_view_model(text_box->view, TextBoxModel * model, { model->focus = focus; }, true);
|
||||
}
|
||||
|
||||
@@ -649,6 +649,5 @@ void* text_input_get_validator_callback_context(TextInput* text_input) {
|
||||
|
||||
void text_input_set_header_text(TextInput* text_input, const char* text) {
|
||||
furi_check(text_input);
|
||||
with_view_model(
|
||||
text_input->view, TextInputModel * model, { model->header = text; }, true);
|
||||
with_view_model(text_input->view, TextInputModel * model, { model->header = text; }, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user