!48104 修复subwindow在前台,bindMenu无法show in subwindow的问题

Merge pull request !48104 from FredTT/temp1109
This commit is contained in:
openharmony_ci 2024-11-09 12:41:31 +00:00 committed by Gitee
commit e330ec8a12
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -2015,15 +2015,8 @@ void ViewAbstract::BindMenuWithCustomNode(std::function<void()>&& buildFunc, con
}
if (menuParam.type == MenuType::MENU && expandDisplay && menuParam.isShowInSubWindow &&
targetNode->GetTag() != V2::SELECT_ETS_TAG) {
bool isShown = SubwindowManager::GetInstance()->GetShown();
if (!isShown) {
SubwindowManager::GetInstance()->ShowMenuNG(
std::move(buildFunc), std::move(previewBuildFunc), menuParam, targetNode, offset);
} else {
auto menuNode = overlayManager->GetMenuNode(targetNode->GetId());
TAG_LOGI(AceLogTag::ACE_MENU, "will hide menu, tagetNode id %{public}d.", targetNode->GetId());
SubwindowManager::GetInstance()->HideMenuNG(menuNode, targetNode->GetId());
}
return;
}
NG::ScopedViewStackProcessor builderViewStackProcessor;