diff --git a/Pixiview.iOS.OpenExtension/Pixiview.iOS.OpenExtension.csproj b/Pixiview.iOS.OpenExtension/Pixiview.iOS.OpenExtension.csproj
index 532e219..ac6ae78 100644
--- a/Pixiview.iOS.OpenExtension/Pixiview.iOS.OpenExtension.csproj
+++ b/Pixiview.iOS.OpenExtension/Pixiview.iOS.OpenExtension.csproj
@@ -38,7 +38,6 @@
4
iPhone Developer
true
- true
Entitlements.plist
SdkOnly
ARM64
diff --git a/Pixiview.iOS/Pixiview.iOS.csproj b/Pixiview.iOS/Pixiview.iOS.csproj
index d6b1fef..f93cef6 100644
--- a/Pixiview.iOS/Pixiview.iOS.csproj
+++ b/Pixiview.iOS/Pixiview.iOS.csproj
@@ -168,5 +168,6 @@
+
\ No newline at end of file
diff --git a/Pixiview.iOS/Resources/download.png b/Pixiview.iOS/Resources/download.png
new file mode 100644
index 0000000..2349fbd
Binary files /dev/null and b/Pixiview.iOS/Resources/download.png differ
diff --git a/Pixiview/Illust/FavoritesPage.xaml.cs b/Pixiview/Illust/FavoritesPage.xaml.cs
index 7103dc5..2dd45f4 100644
--- a/Pixiview/Illust/FavoritesPage.xaml.cs
+++ b/Pixiview/Illust/FavoritesPage.xaml.cs
@@ -49,7 +49,7 @@ namespace Pixiview.Illust
public void Reload(bool force = false)
{
- loaded = false;
+ lastUpdated = default;
StartLoad(force);
}
diff --git a/Pixiview/Illust/IllustCollectionPage.cs b/Pixiview/Illust/IllustCollectionPage.cs
index f8e9237..c97c974 100644
--- a/Pixiview/Illust/IllustCollectionPage.cs
+++ b/Pixiview/Illust/IllustCollectionPage.cs
@@ -50,12 +50,12 @@ namespace Pixiview.Illust
#endregion
- protected static bool NeedUpdate { get; private set; } = true;
+ protected static DateTime LastUpdated { get; private set; } = DateTime.Now;
public IllustCollection IllustCollection { get; set; }
protected virtual bool IsFavoriteVisible => true;
- protected bool loaded;
+ protected DateTime lastUpdated;
private T illustData;
private readonly ParallelOptions parallelOptions = new ParallelOptions { MaxDegreeOfParallelism = Configs.MaxThreads };
@@ -77,7 +77,7 @@ namespace Pixiview.Illust
public override void OnUnload()
{
Illusts = IllustCollection.Empty;
- loaded = false;
+ lastUpdated = default;
}
protected override void OnAppearing()
@@ -85,10 +85,8 @@ namespace Pixiview.Illust
base.OnAppearing();
Connectivity.ConnectivityChanged += Connectivity_ConnectivityChanged;
- if (NeedUpdate || !loaded)
+ if (lastUpdated != LastUpdated)
{
- NeedUpdate = false;
- loaded = false;
StartLoad();
}
else if (IsFavoriteVisible)
@@ -111,7 +109,7 @@ namespace Pixiview.Illust
{
if (e.NetworkAccess == NetworkAccess.Internet)
{
- if (!loaded)
+ if (lastUpdated != LastUpdated)
{
StartLoad(true);
}
@@ -149,9 +147,9 @@ namespace Pixiview.Illust
protected void StartLoad(bool force = false)
{
- if (force || !loaded)
+ if (force || lastUpdated != LastUpdated)
{
- loaded = true;
+ lastUpdated = LastUpdated;
IsLoading = true;
Task.Run(() => DoLoadIllusts(force));
}
@@ -166,7 +164,7 @@ namespace Pixiview.Illust
// image
var image = new RoundImage
{
- BackgroundColor = Color.LightGray,
+ BackgroundColor = StyleDefinition.ColorDownloadBackground,
CornerRadius = 10,
CornerMasks = CornerMask.Top,
HorizontalOptions = LayoutOptions.Fill,
@@ -351,7 +349,7 @@ namespace Pixiview.Illust
}
if (force && IsFavoriteVisible)
{
- NeedUpdate = true;
+ LastUpdated = DateTime.Now;
}
var data = DoGetIllustList(illustData, commandIllustImageTapped).Where(i => i != null);
@@ -362,6 +360,10 @@ namespace Pixiview.Illust
var favorites = Stores.Favorites;
foreach (var item in collection)
{
+ if (item.Image == null)
+ {
+ item.Image = StyleDefinition.DownloadBackground;
+ }
item.IsFavorite = favorites.Any(i => i.Id == item.Id);
}
}
diff --git a/Pixiview/UI/StyleDefinition.cs b/Pixiview/UI/StyleDefinition.cs
index 2cef140..07c9644 100644
--- a/Pixiview/UI/StyleDefinition.cs
+++ b/Pixiview/UI/StyleDefinition.cs
@@ -17,6 +17,8 @@ namespace Pixiview.UI
public static readonly Color ColorLightShadow = Color.FromRgba(0, 0, 0, 0x20);
public static readonly Color ColorDeepShadow = Color.FromRgba(0, 0, 0, 0x50);
public static readonly Color ColorRedBackground = Color.FromRgb(0xfd, 0x43, 0x63);
+ public static readonly Color ColorDownloadBackground = Color.FromRgb(0xd7, 0xd9, 0xe0);
+ public static readonly ImageSource DownloadBackground = ImageSource.FromFile("download.png");
public static readonly double FontSizeMicro = Device.GetNamedSize(NamedSize.Micro, typeof(Label));
public static readonly double FontSizeSmall = Device.GetNamedSize(NamedSize.Small, typeof(Label));