diff --git a/Pixiview/Illust/RankingPage.xaml b/Pixiview/Illust/RankingPage.xaml index 4ada51a..3937ff1 100644 --- a/Pixiview/Illust/RankingPage.xaml +++ b/Pixiview/Illust/RankingPage.xaml @@ -76,6 +76,7 @@ (int)GetValue(SegmentDateProperty); set => SetValue(SegmentDateProperty, value); } + public bool SegmentTypeVisible + { + get => (bool)GetValue(SegmentTypeVisibleProperty); + set => SetValue(SegmentTypeVisibleProperty, value); + } public int SegmentType { get => (int)GetValue(SegmentTypeProperty); @@ -97,17 +104,33 @@ namespace Pixiview.Illust InitializeComponent(); gridFilter.TranslationY = -100; panelFilter.TranslationY = -100; - } - public override void OnLoad() - { + // preferences SegmentDate = Preferences.Get(Configs.QueryModeKey, 0); SegmentType = Preferences.Get(Configs.QueryTypeKey, 0); lastQueryKey = QueryKey; queryDate = Preferences.Get(Configs.QueryDateKey, null); currentPage = 1; datePicker.MinimumDate = new DateTime(2007, 9, 13); - MaximumDate = DateTime.Now; + MaximumDate = DateTime.Today; + } + + protected override void OnAppearing() + { + var r18 = Configs.IsOnR18; + if (!r18) + { + SegmentType = 0; + var query = QueryKey; + if (lastQueryKey != query) + { + ReleaseCollection(); + lastQueryKey = query; + } + } + SegmentTypeVisible = r18; + + base.OnAppearing(); } protected override void OnDisappearing() @@ -243,17 +266,11 @@ namespace Pixiview.Illust ToggleFilterPanel(false); } // release - var collection = IllustCollection; - if (collection != null) - { - collection.Running = false; - IllustCollection = null; - } + ReleaseCollection(); previousEnabled = false; dateEnabled = false; nextEnabled = false; queryDate = date; - currentPage = 1; StartLoad(true); } } @@ -273,22 +290,17 @@ namespace Pixiview.Illust private void DatePicker_DateSelected(object sender, DateChangedEventArgs e) { - if (IsLoading) + if (e.OldDate == DateTime.Today || IsLoading) { + // first load or loading return; } // release - var collection = IllustCollection; - if (collection != null) - { - collection.Running = false; - IllustCollection = null; - } + ReleaseCollection(); previousEnabled = false; dateEnabled = false; nextEnabled = false; queryDate = e.NewDate.ToString("yyyyMMdd"); - currentPage = 1; StartLoad(true); } @@ -342,17 +354,11 @@ namespace Pixiview.Illust { return; } - if (lastQueryKey != query) + //if (lastQueryKey != query) { // release - var collection = IllustCollection; - if (collection != null) - { - collection.Running = false; - IllustCollection = null; - } + ReleaseCollection(); // query changed. - currentPage = 1; lastQueryKey = query; refresh = true; App.DebugPrint($"query changed: {query}"); @@ -363,5 +369,16 @@ namespace Pixiview.Illust StartLoad(true); } } + + private void ReleaseCollection() + { + var collection = IllustCollection; + if (collection != null) + { + collection.Running = false; + IllustCollection = null; + } + currentPage = 1; + } } } diff --git a/Pixiview/Illust/RecommendsPage.xaml.cs b/Pixiview/Illust/RecommendsPage.xaml.cs index 2768da8..1bdcffc 100644 --- a/Pixiview/Illust/RecommendsPage.xaml.cs +++ b/Pixiview/Illust/RecommendsPage.xaml.cs @@ -92,6 +92,7 @@ namespace Pixiview.Illust return new Grid { RowSpacing = 0, + ColumnSpacing = 0, RowDefinitions = { new RowDefinition { Height = 40 }, diff --git a/Pixiview/Illust/ViewIllustPage.xaml.cs b/Pixiview/Illust/ViewIllustPage.xaml.cs index 2c26f64..26a5683 100644 --- a/Pixiview/Illust/ViewIllustPage.xaml.cs +++ b/Pixiview/Illust/ViewIllustPage.xaml.cs @@ -148,6 +148,7 @@ namespace Pixiview.Illust protected override void OnDisappearing() { + Screen.SetHomeIndicatorAutoHidden(Shell.Current, false); base.OnDisappearing(); if (ugoira != null) @@ -160,7 +161,6 @@ namespace Pixiview.Illust { Stores.SaveFavoritesIllusts(); } - Screen.SetHomeIndicatorAutoHidden(Shell.Current, false); } private DataTemplate GetCarouseTemplate(bool multiPages) diff --git a/Pixiview/Utils/Stores.cs b/Pixiview/Utils/Stores.cs index f741b87..bd507a2 100644 --- a/Pixiview/Utils/Stores.cs +++ b/Pixiview/Utils/Stores.cs @@ -450,7 +450,7 @@ namespace Pixiview.Utils public const string QueryTypeKey = "query_type"; public const string QueryDateKey = "query_date"; - public const int MaxThreads = 3; + public const int MaxThreads = 6; public const string Referer = "https://www.pixiv.net/"; public const string RefererIllust = "https://www.pixiv.net/artworks/{0}"; public const string RefererIllustRanking = "https://www.pixiv.net/ranking.php?{0}"; diff --git a/README.md b/README.md index ca6c07b..1fd4b2b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,14 @@ iOS/Android client app for [Pixiv.net](https://pixiv.net/). ## Screenshot -![screenshot](Res/screenshot.png) +|![screenshot](Res/screenshot.png)|![screenshot2](Res/screenshot2.png)| +|:-|:-| +|![screenshot3](Res/screenshot3.png)|![screenshot4](Res/screenshot4.png)| +|:-|:-| +|![screenshot5](Res/screenshot5.png)|![screenshot6](Res/screenshot6.png)| +|:-|:-| +|![screenshot7](Res/screenshot7.png)|![screenshot8](Res/screenshot8.png)| + ## Dependencies diff --git a/Res/screenshot.png b/Res/screenshot.png index f5ea5af..83d45d0 100644 Binary files a/Res/screenshot.png and b/Res/screenshot.png differ diff --git a/Res/screenshot2.png b/Res/screenshot2.png new file mode 100644 index 0000000..16d4f54 Binary files /dev/null and b/Res/screenshot2.png differ diff --git a/Res/screenshot3.png b/Res/screenshot3.png new file mode 100644 index 0000000..9f93d09 Binary files /dev/null and b/Res/screenshot3.png differ diff --git a/Res/screenshot4.png b/Res/screenshot4.png new file mode 100644 index 0000000..d03e707 Binary files /dev/null and b/Res/screenshot4.png differ diff --git a/Res/screenshot5.png b/Res/screenshot5.png new file mode 100644 index 0000000..bb8a269 Binary files /dev/null and b/Res/screenshot5.png differ diff --git a/Res/screenshot6.png b/Res/screenshot6.png new file mode 100644 index 0000000..08e0575 Binary files /dev/null and b/Res/screenshot6.png differ diff --git a/Res/screenshot7.png b/Res/screenshot7.png new file mode 100644 index 0000000..d2ad3ef Binary files /dev/null and b/Res/screenshot7.png differ diff --git a/Res/screenshot8.png b/Res/screenshot8.png new file mode 100644 index 0000000..0130905 Binary files /dev/null and b/Res/screenshot8.png differ