fix: display title opened from url

This commit is contained in:
Tsanie Lily 2020-05-15 12:56:25 +08:00
parent bfc348d7e2
commit 0085d21156
3 changed files with 7 additions and 2 deletions

View File

@ -148,6 +148,10 @@ namespace Pixiview.Illust
protected override IEnumerable<IllustItem> DoGetIllustList(IllustRankingData data)
{
if (lastQueryKey != null && lastQueryKey.StartsWith(segmentDates[3]))
{
return data.contents.Where(i => i.illust_type == "0").Select(i => i.ConvertToItem());
}
return data.contents.Select(i => i.ConvertToItem());
}

View File

@ -6,8 +6,7 @@
x:Class="Pixiview.Illust.ViewIllustPage"
ios:Page.UseSafeArea="False"
Shell.TabBarIsVisible="False"
BackgroundColor="{DynamicResource WindowColor}"
Title="{Binding IllustItem.Title}">
BackgroundColor="{DynamicResource WindowColor}">
<ContentPage.ToolbarItems>
<ToolbarItem Order="Primary" Clicked="Favorite_Clicked"
IconImageSource="{Binding FavoriteIcon}"/>

View File

@ -113,6 +113,7 @@ namespace Pixiview.Illust
public ViewIllustPage(IllustItem illust, bool save)
{
IllustItem = illust;
Title = illust.Title;
saveFavorites = save;
BindingContext = this;
@ -345,6 +346,7 @@ namespace Pixiview.Illust
if (preload != null && preload.illust.TryGetValue(illustItem.Id, out var illust))
{
illust.CopyToItem(illustItem);
MainThread.BeginInvokeOnMainThread(() => Title = illustItem.Title);
if (preload.user.TryGetValue(illust.userId, out var user))
{
illustItem.ProfileUrl = user.image;