mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into mntm-dev
This commit is contained in:
@@ -740,7 +740,7 @@ static void byte_input_reset_model_input_data(ByteInputModel* model) {
|
||||
model->first_visible_byte = 0;
|
||||
}
|
||||
|
||||
ByteInput* byte_input_alloc() {
|
||||
ByteInput* byte_input_alloc(void) {
|
||||
ByteInput* byte_input = malloc(sizeof(ByteInput));
|
||||
byte_input->view = view_alloc();
|
||||
view_set_context(byte_input->view, byte_input);
|
||||
@@ -764,13 +764,13 @@ ByteInput* byte_input_alloc() {
|
||||
}
|
||||
|
||||
void byte_input_free(ByteInput* byte_input) {
|
||||
furi_assert(byte_input);
|
||||
furi_check(byte_input);
|
||||
view_free(byte_input->view);
|
||||
free(byte_input);
|
||||
}
|
||||
|
||||
View* byte_input_get_view(ByteInput* byte_input) {
|
||||
furi_assert(byte_input);
|
||||
furi_check(byte_input);
|
||||
return byte_input->view;
|
||||
}
|
||||
|
||||
@@ -781,6 +781,8 @@ void byte_input_set_result_callback(
|
||||
void* callback_context,
|
||||
uint8_t* bytes,
|
||||
uint8_t bytes_count) {
|
||||
furi_check(byte_input);
|
||||
|
||||
with_view_model(
|
||||
byte_input->view,
|
||||
ByteInputModel * model,
|
||||
@@ -796,6 +798,8 @@ 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user