impl navigator pop
This commit is contained in:
parent
a48dd1de2f
commit
38f761aad7
@ -169,7 +169,6 @@ ApplicationWindow {
|
|||||||
|
|
||||||
function navigatorPop() {
|
function navigatorPop() {
|
||||||
stack.pop()
|
stack.pop()
|
||||||
console.log("stack.depth", stack.depth)
|
|
||||||
if (stack.depth > 1) {
|
if (stack.depth > 1) {
|
||||||
navbar.visible = true
|
navbar.visible = true
|
||||||
} else {
|
} else {
|
||||||
|
@ -59,7 +59,21 @@ void DoricNavigatorPlugin::push(QString jsValueString, QString callbackId) {
|
|||||||
DoricThreadMode::JS);
|
DoricThreadMode::JS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoricNavigatorPlugin::pop(QString jsValueString, QString callbackId) {}
|
void DoricNavigatorPlugin::pop(QString jsValueString, QString callbackId) {
|
||||||
|
getContext()->getDriver()->asyncCall(
|
||||||
|
[this] {
|
||||||
|
QObject *window = getContext()->getQmlEngine()->rootObjects().at(0);
|
||||||
|
QMetaObject::invokeMethod(window, "navigatorPop");
|
||||||
|
},
|
||||||
|
DoricThreadMode::UI);
|
||||||
|
|
||||||
|
getContext()->getDriver()->asyncCall(
|
||||||
|
[this, callbackId] {
|
||||||
|
QVariantList args;
|
||||||
|
DoricPromise::resolve(getContext(), callbackId, args);
|
||||||
|
},
|
||||||
|
DoricThreadMode::JS);
|
||||||
|
}
|
||||||
|
|
||||||
void DoricNavigatorPlugin::popSelf(QString jsValueString, QString callbackId) {}
|
void DoricNavigatorPlugin::popSelf(QString jsValueString, QString callbackId) {}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user