Modules: locking view model (#2189)
* Popup, dialog_ex: locking model * Desktop: do not use the model where it is not needed Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -17,7 +17,7 @@ struct DesktopSettingsViewPinSetupHowto {
|
||||
|
||||
static void desktop_settings_view_pin_setup_howto_draw(Canvas* canvas, void* model) {
|
||||
furi_assert(canvas);
|
||||
furi_assert(model);
|
||||
UNUSED(model);
|
||||
|
||||
canvas_draw_icon(canvas, 16, 18, &I_Pin_attention_dpad_29x29);
|
||||
elements_button_right(canvas, "Next");
|
||||
@@ -57,7 +57,6 @@ void desktop_settings_view_pin_setup_howto_set_callback(
|
||||
DesktopSettingsViewPinSetupHowto* desktop_settings_view_pin_setup_howto_alloc() {
|
||||
DesktopSettingsViewPinSetupHowto* view = malloc(sizeof(DesktopSettingsViewPinSetupHowto));
|
||||
view->view = view_alloc();
|
||||
view_allocate_model(view->view, ViewModelTypeLockFree, 1);
|
||||
view_set_context(view->view, view);
|
||||
view_set_draw_callback(view->view, desktop_settings_view_pin_setup_howto_draw);
|
||||
view_set_input_callback(view->view, desktop_settings_view_pin_setup_howto_input);
|
||||
|
@@ -18,7 +18,7 @@ struct DesktopSettingsViewPinSetupHowto2 {
|
||||
|
||||
static void desktop_settings_view_pin_setup_howto2_draw(Canvas* canvas, void* model) {
|
||||
furi_assert(canvas);
|
||||
furi_assert(model);
|
||||
UNUSED(model);
|
||||
|
||||
canvas_set_font(canvas, FontSecondary);
|
||||
elements_multiline_text_aligned(
|
||||
@@ -79,7 +79,6 @@ void desktop_settings_view_pin_setup_howto2_set_ok_callback(
|
||||
DesktopSettingsViewPinSetupHowto2* desktop_settings_view_pin_setup_howto2_alloc() {
|
||||
DesktopSettingsViewPinSetupHowto2* view = malloc(sizeof(DesktopSettingsViewPinSetupHowto2));
|
||||
view->view = view_alloc();
|
||||
view_allocate_model(view->view, ViewModelTypeLockFree, 1);
|
||||
view_set_context(view->view, view);
|
||||
view_set_draw_callback(view->view, desktop_settings_view_pin_setup_howto2_draw);
|
||||
view_set_input_callback(view->view, desktop_settings_view_pin_setup_howto2_input);
|
||||
|
Reference in New Issue
Block a user