mirror of
https://protopirate.net/ProtoPirate/ProtoPirate.git
synced 2026-05-26 03:24:01 +00:00
call a callback where needed ?
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user