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

Signed-off-by: huqingyun <huqingyun1@huawei.com>
Change-Id: Ib94016fa35f52a1058a52a627e123b8568d020fe
This commit is contained in:
huqingyun 2024-11-18 20:41:16 +08:00
parent a54c5c02f9
commit baa846d9dc

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 (hasInnerAreaChangeUntriggered_.find(id) == hasInnerAreaChangeUntriggered_.end()) {
hasInnerAreaChangeUntriggered_.emplace_back(id);
}
onAreaChangedInnerCallbacks_[id] = std::move(callback);
hasInnerAreaChangeUntriggered_.emplace_back(id);
}
void EventHub::RemoveInnerOnAreaChangedCallback(int32_t id)