Skip to content

Commit

Permalink
Fix missing author name
Browse files Browse the repository at this point in the history
  • Loading branch information
andybak committed Dec 3, 2024
1 parent 020e69f commit febc085
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,10 @@ public static bool ParseReturnedAssets(string response, PolyMenuMain.CreationTyp
foreach (JToken asset in assets)
{
ObjectStoreEntry objectStoreEntry;
string author = null;
var accountId = asset["authorId"];

if (type == PolyMenuMain.CreationType.FEATURED || type == PolyMenuMain.CreationType.LIKED)
{
string assetId = asset["url"].ToString();
string assetId = asset["url"]?.ToString();
if (firstAssetId == null)
{
firstAssetId = assetId;
Expand All @@ -268,7 +266,6 @@ public static bool ParseReturnedAssets(string response, PolyMenuMain.CreationTyp
}
if (ParseAsset(asset, out objectStoreEntry, hackUrls))
{
objectStoreEntry.author = author;
objectStoreEntries.Add(objectStoreEntry);
}
}
Expand Down Expand Up @@ -346,6 +343,7 @@ public static bool ParseAsset(JToken asset, out ObjectStoreEntry objectStoreEntr
entryAssets.peltzer = blocksAsset;
objectStoreEntry.assets = entryAssets;
objectStoreEntry.title = asset["displayName"].ToString();
objectStoreEntry.author = asset["authorName"].ToString();
objectStoreEntry.createdDate = DateTime.Parse(asset["createTime"].ToString());
objectStoreEntry.cameraForward = GetCameraForward(asset["presentationParams"]["orientingRotation"]);
return true;
Expand Down

0 comments on commit febc085

Please sign in to comment.