Fix bug with disappearing certificate info

This commit is contained in:
Zach Fox 2017-11-13 10:53:16 -08:00
parent 9df11fb11a
commit 641c4656c4
2 changed files with 18 additions and 15 deletions

View file

@ -113,21 +113,6 @@ Rectangle {
}
}
onVisibleChanged: {
if (!visible) {
titleBarText.text = "Certificate";
popText.text = "PROOF OF PURCHASE";
root.certificateId = "";
root.itemName = "--";
root.itemOwner = "--";
root.itemEdition = "--";
root.dateOfPurchase = "--";
root.marketplaceUrl = "";
root.isMyCert = false;
errorText.text = "";
}
}
// This object is always used in a popup.
// This MouseArea is used to prevent a user from being
// able to click on a button/mouseArea underneath the popup.
@ -420,6 +405,18 @@ Rectangle {
case 'inspectionCertificate_setCertificateId':
root.certificateId = message.certificateId;
break;
case 'inspectionCertificate_resetCert':
titleBarText.text = "Certificate";
popText.text = "PROOF OF PURCHASE";
root.certificateId = "";
root.itemName = "--";
root.itemOwner = "--";
root.itemEdition = "--";
root.dateOfPurchase = "--";
root.marketplaceUrl = "";
root.isMyCert = false;
errorText.text = "";
break;
default:
console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message));
}

View file

@ -128,6 +128,12 @@
} else {
ContextOverlay.isInMarketplaceInspectionMode = false;
}
if (!onCommerceScreen) {
tablet.sendToQml({
method: 'inspectionCertificate_resetCert'
});
}
}
function openWallet() {