Skip to content

Commit

Permalink
fixed end of list count issue
Browse files Browse the repository at this point in the history
  • Loading branch information
eomene committed Apr 26, 2021
1 parent f72894e commit 4792fd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Runtime/Game/Requests/AssetRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public static void GetAssetListWithCount(LootLockerGetRequest data, Action<LootL
if (string.IsNullOrEmpty(serverResponse.Error))
{
response = JsonConvert.DeserializeObject<LootLockerAssetResponse>(serverResponse.text);
if (response != null)
if (response != null && response.assets.Length > 0)
LootLockerAssetRequest.lastId = response.assets.Last()?.id != null ? response.assets.Last().id : 0;
}
Expand All @@ -281,7 +281,7 @@ public static void GetAssetListWithAfterCount(LootLockerAssetRequest data, Actio
{
response = JsonConvert.DeserializeObject<LootLockerAssetResponse>(serverResponse.text);
if (response != null)
if (response != null && response.assets.Length > 0)
LootLockerAssetRequest.lastId = response.assets.Last()?.id != null ? response.assets.Last().id : 0;
}
// LootLockerSDKManager.DebugMessage(serverResponse.text, !string.IsNullOrEmpty(serverResponse.Error));
Expand Down
4 changes: 2 additions & 2 deletions Runtime/Game/Requests/LootLockerVerifyRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public static void Verify(LootLockerVerifyRequest data, Action<LootLockerVerifyR
//LootLockerSDKManager.DebugMessage(serverResponse.text, !string.IsNullOrEmpty(serverResponse.Error));
response.text = serverResponse.text;
response.status = serverResponse.status;
response.Error = serverResponse.Error; response.statusCode = serverResponse.statusCode;
response.status = serverResponse.status;
response.Error = serverResponse.Error; response.statusCode = serverResponse.statusCode;
onComplete?.Invoke(response);
}, false);
}
Expand Down

0 comments on commit 4792fd8

Please sign in to comment.