Fix request inventory
This commit is contained in:
parent
855b717dfe
commit
df7d9d36bc
1 changed files with 9 additions and 1 deletions
|
@ -67,6 +67,7 @@ public class InAppPurchaseHelper {
|
|||
private String token = "";
|
||||
private InAppPurchaseTaskType activeTask;
|
||||
private boolean processingTask = false;
|
||||
private boolean inventoryRequestPending = false;
|
||||
|
||||
private OsmandApplication ctx;
|
||||
private InAppPurchaseListener uiActivity = null;
|
||||
|
@ -180,7 +181,10 @@ public class InAppPurchaseHelper {
|
|||
}
|
||||
|
||||
if (processingTask) {
|
||||
logError("Already processing task: " + taskType + ". Exit.");
|
||||
if (taskType == InAppPurchaseTaskType.REQUEST_INVENTORY) {
|
||||
inventoryRequestPending = true;
|
||||
}
|
||||
logError("Already processing task: " + activeTask + ". Exit.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -700,6 +704,10 @@ public class InAppPurchaseHelper {
|
|||
processingTask = false;
|
||||
activeTask = null;
|
||||
}
|
||||
if (inventoryRequestPending) {
|
||||
inventoryRequestPending = false;
|
||||
requestInventory();
|
||||
}
|
||||
}
|
||||
|
||||
private void sendTokens(@NonNull final List<Purchase> purchases, final OnRequestResultListener listener) {
|
||||
|
|
Loading…
Reference in a new issue