FIX: update the time shown; keep the val update while popup

jira: [STUDIO-9268]
Change-Id: I0b743ddb0ae479f9baad6239f68861a199681cda
(cherry picked from commit e1bc737d1cbc1dcf79ceecf9ed301a4a02590d5a)
This commit is contained in:
xin.zhang
2025-02-27 16:37:01 +08:00
committed by Noisyfox
parent 502cee88ee
commit 87c0719b32
4 changed files with 29 additions and 2 deletions

View File

@@ -1066,6 +1066,26 @@ void AMSControl::UpdateAms(std::vector<AMSinfo> info, bool is_reset)
if (m_ams_model == AMSModel::EXT_AMS && !m_vams_lib->is_selected()) {
m_vams_lib->OnSelected();
}
/*update humidity popup*/
if (m_percent_humidity_dry_popup->IsShown())
{
string target_id = m_percent_humidity_dry_popup->get_owner_ams_id();
for (const auto& the_info : info)
{
if (target_id == the_info.ams_id)
{
uiAmsHumidityInfo humidity_info;
humidity_info.ams_id = the_info.ams_id;
humidity_info.humidity_level = the_info.ams_humidity;
humidity_info.humidity_percent = the_info.humidity_raw;
humidity_info.left_dry_time = the_info.left_dray_time;
humidity_info.current_temperature = the_info.current_temperature;
m_percent_humidity_dry_popup->Update(&humidity_info);
break;
}
}
}
}
void AMSControl::AddAmsItems(AMSinfo info)