Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Commit

Permalink
修正小问题
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiichiamane committed May 18, 2019
1 parent 5bda804 commit f73a40a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion PixivFSUWP/Data/BookmarkIllustsCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected async Task<LoadMoreItemsResult> LoadMoreItemsAsync(CancellationToken c
throw new Exception();
}
await Task.Run(() => pause.WaitOne());
Data.WaterfallItem recommendi = Data.WaterfallItem.FromJsonValue(recillust as JsonObject);
Data.WaterfallItem recommendi = Data.WaterfallItem.FromJsonValue(recillust.GetObject());
var recommendmodel = ViewModels.WaterfallItemViewModel.FromItem(recommendi);
await recommendmodel.LoadImageAsync();
Add(recommendmodel);
Expand Down
2 changes: 1 addition & 1 deletion PixivFSUWP/Data/CommentsCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected async Task<LoadMoreItemsResult> LoadMoreItemsAsync(CancellationToken c
throw new Exception();
}
await Task.Run(() => pause.WaitOne());
Data.IllustCommentItem recommendi = Data.IllustCommentItem.FromJsonValue(recillust as JsonObject);
Data.IllustCommentItem recommendi = Data.IllustCommentItem.FromJsonValue(recillust.GetObject());
var recommendmodel = ViewModels.CommentViewModel.FromItem(recommendi);
//await recommendmodel.LoadAvatarAsync();
Add(recommendmodel);
Expand Down
2 changes: 1 addition & 1 deletion PixivFSUWP/Data/FollowingIllustsCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected async Task<LoadMoreItemsResult> LoadMoreItemsAsync(CancellationToken c
throw new Exception();
}
await Task.Run(() => pause.WaitOne());
Data.WaterfallItem recommendi = Data.WaterfallItem.FromJsonValue(recillust as JsonObject);
Data.WaterfallItem recommendi = Data.WaterfallItem.FromJsonValue(recillust.GetObject());
var recommendmodel = ViewModels.WaterfallItemViewModel.FromItem(recommendi);
await recommendmodel.LoadImageAsync();
Add(recommendmodel);
Expand Down
4 changes: 2 additions & 2 deletions PixivFSUWP/Data/IllustDetail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static IllustDetail FromJsonValue(JsonObject Source)
var tags = Source["illust"].GetObject()["tags"].GetArray();
toret.Tags = new List<string>();
foreach (var tag in tags)
toret.Tags.Add(((JsonObject)tag)["name"].GetString());
toret.Tags.Add(tag.GetObject()["name"].GetString());
var tools = Source["illust"].GetObject()["tools"].GetArray();
toret.Tools = new List<string>();
foreach (var tool in tools)
Expand All @@ -60,7 +60,7 @@ public static IllustDetail FromJsonValue(JsonObject Source)
{
var pages = Source["illust"].GetObject()["meta_pages"].GetArray();
foreach (var page in pages)
toret.OriginalUrls.Add(((JsonObject)page)["image_urls"].GetObject()["original"].GetString());
toret.OriginalUrls.Add(page.GetObject()["image_urls"].GetObject()["original"].GetString());
}
toret.Width = Convert.ToInt32(Source["illust"].GetObject()["width"].GetString());
toret.Height = Convert.ToInt32(Source["illust"].GetObject()["height"].GetString());
Expand Down
3 changes: 1 addition & 2 deletions PixivFSUWP/Data/RecommendIllustsCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ protected async Task<LoadMoreItemsResult> LoadMoreItemsAsync(CancellationToken c
IncludePrivacyPolicy: getparam("include_privacy_policy"));
}
nexturl = recommendres["next_url"].GetString();
var test = recommendres["illusts"].GetArray();
foreach (var recillust in recommendres["illusts"].GetArray())
{
if (_emergencyStop)
Expand All @@ -90,7 +89,7 @@ protected async Task<LoadMoreItemsResult> LoadMoreItemsAsync(CancellationToken c
throw new Exception();
}
await Task.Run(() => pause.WaitOne());
Data.WaterfallItem recommendi = Data.WaterfallItem.FromJsonValue(recillust as JsonObject);
Data.WaterfallItem recommendi = Data.WaterfallItem.FromJsonValue(recillust.GetObject());
var recommendmodel = ViewModels.WaterfallItemViewModel.FromItem(recommendi);
await recommendmodel.LoadImageAsync();
Add(recommendmodel);
Expand Down

0 comments on commit f73a40a

Please sign in to comment.