mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 04:03:35 +02:00
YAY!
This commit is contained in:
parent
10fa3fa346
commit
33f73fef0d
3 changed files with 6 additions and 11 deletions
|
@ -36,7 +36,7 @@ Rectangle {
|
||||||
property bool isShowingMyItems: false;
|
property bool isShowingMyItems: false;
|
||||||
property bool isDebuggingFirstUseTutorial: false;
|
property bool isDebuggingFirstUseTutorial: false;
|
||||||
property int pendingItemCount: 0;
|
property int pendingItemCount: 0;
|
||||||
property var installedApps;
|
property string installedApps;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.white;
|
color: hifi.colors.white;
|
||||||
Connections {
|
Connections {
|
||||||
|
@ -63,7 +63,6 @@ Rectangle {
|
||||||
} else if (!Settings.getValue("isFirstUseOfPurchases", true) && root.activeView === "initialize") {
|
} else if (!Settings.getValue("isFirstUseOfPurchases", true) && root.activeView === "initialize") {
|
||||||
root.activeView = "purchasesMain";
|
root.activeView = "purchasesMain";
|
||||||
root.installedApps = Commerce.getInstalledApps();
|
root.installedApps = Commerce.getInstalledApps();
|
||||||
console.log("ZRF! " + root.installedApps);
|
|
||||||
Commerce.inventory();
|
Commerce.inventory();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -688,9 +687,6 @@ Rectangle {
|
||||||
var currentId;
|
var currentId;
|
||||||
for (var i = 0; i < tempPurchasesModel.count; i++) {
|
for (var i = 0; i < tempPurchasesModel.count; i++) {
|
||||||
currentId = tempPurchasesModel.get(i).id;
|
currentId = tempPurchasesModel.get(i).id;
|
||||||
console.log("ZRF HERE 2 " + root.installedApps);
|
|
||||||
console.log("ZRF HERE 3 " + currentId);
|
|
||||||
console.log("ZRF HERE 4 " + ((root.installedApps).indexOf(currentId) > -1));
|
|
||||||
|
|
||||||
filteredPurchasesModel.append(tempPurchasesModel.get(i));
|
filteredPurchasesModel.append(tempPurchasesModel.get(i));
|
||||||
filteredPurchasesModel.setProperty(i, 'permissionExplanationCardVisible', false);
|
filteredPurchasesModel.setProperty(i, 'permissionExplanationCardVisible', false);
|
||||||
|
|
|
@ -190,16 +190,15 @@ void QmlCommerce::alreadyOwned(const QString& marketplaceId) {
|
||||||
ledger->alreadyOwned(marketplaceId);
|
ledger->alreadyOwned(marketplaceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList QmlCommerce::getInstalledApps() {
|
QString QmlCommerce::getInstalledApps() {
|
||||||
QStringList installedAppsFromMarketplace;
|
QString installedAppsFromMarketplace;
|
||||||
QStringList runningScripts = DependencyManager::get<ScriptEngines>()->getRunningScripts();
|
QStringList runningScripts = DependencyManager::get<ScriptEngines>()->getRunningScripts();
|
||||||
|
|
||||||
QDir directory(_appsPath);
|
QDir directory(_appsPath);
|
||||||
qCDebug(commerce) << "ZRF FIXME" << _appsPath;
|
|
||||||
QStringList apps = directory.entryList(QStringList("*.app.json"));
|
QStringList apps = directory.entryList(QStringList("*.app.json"));
|
||||||
foreach(QString appFileName, apps) {
|
foreach(QString appFileName, apps) {
|
||||||
installedAppsFromMarketplace.append(appFileName);
|
installedAppsFromMarketplace += appFileName;
|
||||||
qCDebug(commerce) << "ZRF FIXME" << appFileName;
|
installedAppsFromMarketplace += ",";
|
||||||
QFile appFile(_appsPath + appFileName);
|
QFile appFile(_appsPath + appFileName);
|
||||||
if (appFile.open(QIODevice::ReadOnly)) {
|
if (appFile.open(QIODevice::ReadOnly)) {
|
||||||
QJsonDocument appFileJsonDocument = QJsonDocument::fromJson(appFile.readAll());
|
QJsonDocument appFileJsonDocument = QJsonDocument::fromJson(appFile.readAll());
|
||||||
|
|
|
@ -81,7 +81,7 @@ protected:
|
||||||
|
|
||||||
Q_INVOKABLE void replaceContentSet(const QString& itemHref);
|
Q_INVOKABLE void replaceContentSet(const QString& itemHref);
|
||||||
|
|
||||||
Q_INVOKABLE QStringList getInstalledApps();
|
Q_INVOKABLE QString getInstalledApps();
|
||||||
Q_INVOKABLE bool installApp(const QString& appHref);
|
Q_INVOKABLE bool installApp(const QString& appHref);
|
||||||
Q_INVOKABLE bool uninstallApp(const QString& appHref);
|
Q_INVOKABLE bool uninstallApp(const QString& appHref);
|
||||||
Q_INVOKABLE bool openApp(const QString& appHref);
|
Q_INVOKABLE bool openApp(const QString& appHref);
|
||||||
|
|
Loading…
Reference in a new issue