!48828 onAreaChange: 组件内部覆盖回调不会重新触发回调

Merge pull request !48828 from 胡清云/1118_onAreaChange
This commit is contained in:
openharmony_ci 2024-11-19 02:54:27 +00:00 committed by Gitee
commit 6830d5fc38
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -292,8 +292,10 @@ void EventHub::AddInnerOnAreaChangedCallback(int32_t id, OnAreaChangedFunc&& cal
CHECK_NULL_VOID(frameNode);
pipeline->AddOnAreaChangeNode(frameNode->GetId());
frameNode->InitLastArea();
if (onAreaChangedInnerCallbacks_.find(id) == onAreaChangedInnerCallbacks_.end()) {
hasInnerAreaChangeUntriggered_.emplace_back(id);
}
onAreaChangedInnerCallbacks_[id] = std::move(callback);
hasInnerAreaChangeUntriggered_.emplace_back(id);
}
void EventHub::RemoveInnerOnAreaChangedCallback(int32_t id)