Gui: relax some asserts in view (#2623)

* Remove assertion preventing replacement of view input callback
* Gui: relax some asserts in view

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Lewis Westbury 2023-05-03 04:33:30 +01:00 committed by GitHub
parent 23c946ef50
commit 5c09bc5b2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,19 +19,16 @@ void view_tie_icon_animation(View* view, IconAnimation* icon_animation) {
void view_set_draw_callback(View* view, ViewDrawCallback callback) {
furi_assert(view);
furi_assert(view->draw_callback == NULL);
view->draw_callback = callback;
}
void view_set_input_callback(View* view, ViewInputCallback callback) {
furi_assert(view);
furi_assert(view->input_callback == NULL);
view->input_callback = callback;
}
void view_set_custom_callback(View* view, ViewCustomCallback callback) {
furi_assert(view);
furi_assert(callback);
view->custom_callback = callback;
}
@ -62,7 +59,6 @@ void view_set_update_callback_context(View* view, void* context) {
void view_set_context(View* view, void* context) {
furi_assert(view);
furi_assert(context);
view->context = context;
}