mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 15:38:00 +02:00
Fix marketplace item update failing on submitted items
This commit is contained in:
parent
51ce19e026
commit
63172ec87b
2 changed files with 8 additions and 3 deletions
|
@ -256,6 +256,5 @@ void AvatarProject::openInInventory() {
|
||||||
// I'm not a fan of this, but it's the only current option.
|
// I'm not a fan of this, but it's the only current option.
|
||||||
QTimer::singleShot(TIME_TO_WAIT_FOR_INVENTORY_TO_OPEN_MS, [name, tablet]() {
|
QTimer::singleShot(TIME_TO_WAIT_FOR_INVENTORY_TO_OPEN_MS, [name, tablet]() {
|
||||||
tablet->sendToQml(QVariantMap({ { "method", "updatePurchases" }, { "filterText", name } }));
|
tablet->sendToQml(QVariantMap({ { "method", "updatePurchases" }, { "filterText", name } }));
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,7 +190,12 @@ void MarketplaceItemUploader::doUploadAvatar() {
|
||||||
|
|
||||||
QString jsonString = "{\"marketplace_item\":{";
|
QString jsonString = "{\"marketplace_item\":{";
|
||||||
jsonString += "\"title\":\"" + escapeJson(_title) + "\"";
|
jsonString += "\"title\":\"" + escapeJson(_title) + "\"";
|
||||||
|
|
||||||
|
// Items cannot have their description updated after they have been submitted.
|
||||||
|
if (creating) {
|
||||||
jsonString += ",\"description\":\"" + escapeJson(_description) + "\"";
|
jsonString += ",\"description\":\"" + escapeJson(_description) + "\"";
|
||||||
|
}
|
||||||
|
|
||||||
jsonString += ",\"root_file_key\":\"" + escapeJson(_rootFilename) + "\"";
|
jsonString += ",\"root_file_key\":\"" + escapeJson(_rootFilename) + "\"";
|
||||||
jsonString += ",\"category_ids\":[" + QStringLiteral("%1").arg(_categoryID) + "]";
|
jsonString += ",\"category_ids\":[" + QStringLiteral("%1").arg(_categoryID) + "]";
|
||||||
jsonString += ",\"license\":0";
|
jsonString += ",\"license\":0";
|
||||||
|
@ -300,12 +305,13 @@ void MarketplaceItemUploader::doWaitForInventory() {
|
||||||
success = isAssetAvailable();
|
success = isAssetAvailable();
|
||||||
}
|
}
|
||||||
if (success) {
|
if (success) {
|
||||||
|
qDebug() << "Found item in inventory";
|
||||||
setState(State::Complete);
|
setState(State::Complete);
|
||||||
} else {
|
} else {
|
||||||
constexpr int MAX_INVENTORY_REQUESTS { 8 };
|
constexpr int MAX_INVENTORY_REQUESTS { 8 };
|
||||||
constexpr int TIME_BETWEEN_INVENTORY_REQUESTS_MS { 5000 };
|
constexpr int TIME_BETWEEN_INVENTORY_REQUESTS_MS { 5000 };
|
||||||
qDebug() << "Failed to find item in inventory";
|
|
||||||
if (_numRequestsForInventory > MAX_INVENTORY_REQUESTS) {
|
if (_numRequestsForInventory > MAX_INVENTORY_REQUESTS) {
|
||||||
|
qDebug() << "Failed to find item in inventory";
|
||||||
setError(Error::Unknown);
|
setError(Error::Unknown);
|
||||||
} else {
|
} else {
|
||||||
QTimer::singleShot(TIME_BETWEEN_INVENTORY_REQUESTS_MS, [this]() { doWaitForInventory(); });
|
QTimer::singleShot(TIME_BETWEEN_INVENTORY_REQUESTS_MS, [this]() { doWaitForInventory(); });
|
||||||
|
|
Loading…
Reference in a new issue