fix full screen cannot move

This commit is contained in:
王劲鹏 2021-04-22 21:03:03 +08:00 committed by osborn
parent c0ce3b3ae9
commit bbbe3d148a
2 changed files with 7 additions and 1 deletions

View File

@ -101,6 +101,7 @@ void DoricContext::addHeadNode(QString type, DoricViewNode *viewNode) {
if (mHeadNodes.contains(type)) {
QMap<QString, DoricViewNode *> map = mHeadNodes[type];
map.insert(viewNode->getId(), viewNode);
mHeadNodes.insert(type, map);
} else {
QMap<QString, DoricViewNode *> map;
map.insert(viewNode->getId(), viewNode);
@ -112,6 +113,7 @@ void DoricContext::removeHeadNode(QString type, DoricViewNode *viewNode) {
if (mHeadNodes.contains(type)) {
QMap<QString, DoricViewNode *> map = mHeadNodes[type];
map.remove(viewNode->getId());
mHeadNodes.insert(type, map);
}
}
@ -119,5 +121,6 @@ void DoricContext::clearHeadNodes(QString type) {
if (mHeadNodes.contains(type)) {
QMap<QString, DoricViewNode *> map = mHeadNodes[type];
map.clear();
mHeadNodes.insert(type, map);
}
}

View File

@ -80,7 +80,7 @@ void DoricPopoverPlugin::show(QString jsValueString, QString callbackId) {
void DoricPopoverPlugin::dismiss(QString jsValueString, QString callbackId) {
getContext()->getDriver()->asyncCall(
[this, jsValueString] {
[this, jsValueString, callbackId] {
QJsonDocument document =
QJsonDocument::fromJson(jsValueString.toUtf8());
QJsonValue jsValue = document.object();
@ -93,6 +93,9 @@ void DoricPopoverPlugin::dismiss(QString jsValueString, QString callbackId) {
} else {
this->dismissPopover();
}
QVariantList args;
DoricPromise::resolve(getContext(), callbackId, args);
},
DoricThreadMode::UI);
}