Skip to content

Commit

Permalink
fixup! Address Livio comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AKalinich-Luxoft committed Aug 5, 2021
1 parent 1614294 commit 237562b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,10 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateButtonNotificationToMobile(
smart_objects::SmartObject& ref = *msg;
ref[strings::params][strings::connection_key] = app->app_id();

const auto function_id = static_cast<mobile_apis::FunctionID::eType>(
source_message[strings::params][strings::function_id].asInt());
ref[strings::params][strings::function_id] = function_id;

mobile_apis::ButtonName::eType btn_id = mobile_apis::ButtonName::INVALID_ENUM;

if (source_message[strings::msg_params].keyExists(
Expand Down Expand Up @@ -1124,9 +1128,6 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateButtonNotificationToMobile(
return -1;
};

const auto function_id = static_cast<mobile_apis::FunctionID::eType>(
source_message[strings::params][strings::function_id].asInt());

if (mobile_apis::FunctionID::eType::OnButtonPressID == function_id) {
const auto press_mode = static_cast<mobile_apis::ButtonPressMode::eType>(
get_mode_code(hmi_response::button_mode, strings::button_press_mode));
Expand Down

0 comments on commit 237562b

Please sign in to comment.