Skip to content

Commit

Permalink
Merge branch 'dev' into threading-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
skotopes authored Sep 5, 2024
2 parents 65f679d + c632691 commit e58e92b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions applications/services/gui/modules/dialog_ex.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void dialog_ex_set_header(
dialog_ex->view,
DialogExModel * model,
{
furi_string_set(model->header.text, text);
furi_string_set(model->header.text, text ? text : "");
model->header.x = x;
model->header.y = y;
model->header.horizontal = horizontal;
Expand All @@ -243,7 +243,7 @@ void dialog_ex_set_text(
dialog_ex->view,
DialogExModel * model,
{
furi_string_set(model->text.text, text);
furi_string_set(model->text.text, text ? text : "");
model->text.x = x;
model->text.y = y;
model->text.horizontal = horizontal;
Expand All @@ -268,15 +268,18 @@ 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, { furi_string_set(model->left_text, text); }, true);
dialog_ex->view,
DialogExModel * model,
{ furi_string_set(model->left_text, 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,
{ furi_string_set(model->center_text, text); },
{ furi_string_set(model->center_text, text ? text : ""); },
true);
}

Expand All @@ -285,7 +288,7 @@ void dialog_ex_set_right_button_text(DialogEx* dialog_ex, const char* text) {
with_view_model(
dialog_ex->view,
DialogExModel * model,
{ furi_string_set(model->right_text, text); },
{ furi_string_set(model->right_text, text ? text : ""); },
true);
}

Expand Down

0 comments on commit e58e92b

Please sign in to comment.