From f593ff6fdb7c2aaafc395ffb955cfe264fe510fd Mon Sep 17 00:00:00 2001 From: gullradriel Date: Tue, 10 Feb 2026 01:44:38 +0100 Subject: [PATCH] call a callback where needed ? --- views/protopirate_receiver_info.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/views/protopirate_receiver_info.c b/views/protopirate_receiver_info.c index 32f2192..b8ba33a 100644 --- a/views/protopirate_receiver_info.c +++ b/views/protopirate_receiver_info.c @@ -42,16 +42,16 @@ void protopirate_view_receiver_info_draw(Canvas* canvas, ProtoPirateReceiverInfo bool protopirate_view_receiver_info_input(InputEvent* event, void* context) { furi_check(context); - UNUSED(context); - bool consumed = false; + ProtoPirateReceiverInfo* receiver_info = context; - if(event->type == InputTypeShort) { - if(event->key == InputKeyBack) { - consumed = true; + if(event->type == InputTypeShort && event->key == InputKeyBack) { + if(receiver_info->callback) { + receiver_info->callback( + ProtoPirateCustomEventViewReceiverBack, receiver_info->context); } + return true; } - - return consumed; + return false; } void protopirate_view_receiver_info_enter(void* context) {