ofw pr 4285 ViewStack: Store View by value to save memory

by CookiePLMonster
This commit is contained in:
MX
2025-10-12 03:34:40 +03:00
parent de35de4e58
commit fc34205f97
3 changed files with 32 additions and 28 deletions

View File

@@ -2,7 +2,7 @@
View* view_alloc(void) {
View* view = malloc(sizeof(View));
view->orientation = ViewOrientationHorizontal;
view_init(view);
return view;
}
@@ -12,6 +12,10 @@ void view_free(View* view) {
free(view);
}
void view_init(View* view) {
view->orientation = ViewOrientationHorizontal;
}
void view_tie_icon_animation(View* view, IconAnimation* icon_animation) {
furi_check(view);
icon_animation_set_update_callback(icon_animation, view_icon_animation_callback, view);