Skip to content

Commit 4792fd8

Browse files
committed
fixed end of list count issue
1 parent f72894e commit 4792fd8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Runtime/Game/Requests/AssetRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public static void GetAssetListWithCount(LootLockerGetRequest data, Action<LootL
256256
if (string.IsNullOrEmpty(serverResponse.Error))
257257
{
258258
response = JsonConvert.DeserializeObject<LootLockerAssetResponse>(serverResponse.text);
259-
if (response != null)
259+
if (response != null && response.assets.Length > 0)
260260
LootLockerAssetRequest.lastId = response.assets.Last()?.id != null ? response.assets.Last().id : 0;
261261
}
262262

@@ -281,7 +281,7 @@ public static void GetAssetListWithAfterCount(LootLockerAssetRequest data, Actio
281281
{
282282
response = JsonConvert.DeserializeObject<LootLockerAssetResponse>(serverResponse.text);
283283

284-
if (response != null)
284+
if (response != null && response.assets.Length > 0)
285285
LootLockerAssetRequest.lastId = response.assets.Last()?.id != null ? response.assets.Last().id : 0;
286286
}
287287
// LootLockerSDKManager.DebugMessage(serverResponse.text, !string.IsNullOrEmpty(serverResponse.Error));

Runtime/Game/Requests/LootLockerVerifyRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public static void Verify(LootLockerVerifyRequest data, Action<LootLockerVerifyR
4848

4949
//LootLockerSDKManager.DebugMessage(serverResponse.text, !string.IsNullOrEmpty(serverResponse.Error));
5050
response.text = serverResponse.text;
51-
response.status = serverResponse.status;
52-
response.Error = serverResponse.Error; response.statusCode = serverResponse.statusCode;
51+
response.status = serverResponse.status;
52+
response.Error = serverResponse.Error; response.statusCode = serverResponse.statusCode;
5353
onComplete?.Invoke(response);
5454
}, false);
5555
}

0 commit comments

Comments
 (0)