* Pixiview/UI/CardView.cs:

* Pixiview/UI/StyleDefinition.cs:
* Pixiview/Resources/ResourceHelper.cs:
* Pixiview/Resources/Languages/zh-CN.xml:
* Pixiview/Illust/IllustCollectionPage.cs:
* Pixiview.Android/Pixiview.Android.csproj:
* Pixiview.Android/Renderers/AdaptedPageRenderer.cs: UI adjust

* Pixiview/Illust/FavoritesPage.xaml:
* Pixiview/Illust/FavoritesPage.xaml.cs: fix: no title in favorite
  page

* Pixiview/Utils/Stores.cs:
* Pixiview/Illust/RankingPage.xaml.cs: feature: remember last query
  parameters
This commit is contained in:
2020-05-14 18:30:22 +08:00
parent 74e5d8c281
commit a2b91a2406
11 changed files with 86 additions and 15 deletions

View File

@@ -18,12 +18,5 @@
Margin="16" RowSpacing="16" ColumnSpacing="16"
ItemTemplate="{StaticResource cardView}"/>
</ScrollView>
<Frame HasShadow="False" Margin="0" Padding="20" CornerRadius="8"
IsVisible="{Binding IsLoading}"
HorizontalOptions="Center" VerticalOptions="Center"
BackgroundColor="{DynamicResource MaskColor}">
<ActivityIndicator IsRunning="True" IsVisible="True"
Color="{DynamicResource WindowColor}"/>
</Frame>
</Grid>
</i:FavoriteIllustCollectionPage>

View File

@@ -43,7 +43,16 @@ namespace Pixiview.Illust
{
return null;
}
return favorites.Illusts.ToArray();
var illusts = favorites.Illusts;
for (var i = 0; i < illusts.Count; i++)
{
var item = illusts[i];
if (item.RankTitle == null)
{
item.RankTitle = item.Title;
}
}
return illusts.ToArray();
}
public void Reload(bool force = false)

View File

@@ -312,7 +312,7 @@ namespace Pixiview.Illust
Margin = 0,
CornerRadius = 10,
ShadowColor = StyleDefinition.ColorLightShadow,
ShadowOffset = new Size(2, 2),
ShadowOffset = new Size(1, 1),
Content = new Grid
{
HorizontalOptions = LayoutOptions.Fill,
@@ -358,7 +358,7 @@ namespace Pixiview.Illust
Margin = 0,
CornerRadius = 10,
ShadowColor = StyleDefinition.ColorLightShadow,
ShadowOffset = new Size(2, 2),
ShadowOffset = new Size(1, 1),
Content = new Grid
{
HorizontalOptions = LayoutOptions.Fill,
@@ -427,6 +427,7 @@ namespace Pixiview.Illust
protected void DoLoadIllusts(bool force = false)
{
App.DebugPrint($"start loading data, force: {force}");
illustData = DoLoadIllustData(force);
if (illustData == null)
{

View File

@@ -98,13 +98,32 @@ namespace Pixiview.Illust
InitializeComponent();
gridFilter.TranslationY = -100;
panelFilter.TranslationY = -100;
}
public override void OnLoad()
{
SegmentDate = Preferences.Get(Configs.QueryModeKey, 0);
SegmentType = Preferences.Get(Configs.QueryTypeKey, 0);
lastQueryKey = QueryKey;
queryDate = null; // $"{now.Year}{now.Month:00}{now.Day:00}";
queryDate = Preferences.Get(Configs.QueryDateKey, null);
currentPage = 1;
datePicker.MinimumDate = new DateTime(2007, 9, 13);
MaximumDate = DateTime.Now;
App.DebugPrint("page loaded.");
}
protected override void OnDisappearing()
{
base.OnDisappearing();
// saving state
Preferences.Set(Configs.QueryModeKey, SegmentDate);
Preferences.Set(Configs.QueryTypeKey, SegmentType);
if (queryDate != null)
{
Preferences.Set(Configs.QueryDateKey, queryDate);
}
}
protected override void DoIllustsLoaded(IllustCollection collection)