diff --git a/Gallery.Share/App.cs b/Gallery.Share/App.cs index 8a30d38..4eada77 100644 --- a/Gallery.Share/App.cs +++ b/Gallery.Share/App.cs @@ -16,12 +16,7 @@ namespace Gallery public static PlatformCulture CurrentCulture { get; private set; } public static Dictionary RefreshTimes { get; } = new(); - public static List GallerySources { get; } = new() - { - new Sources.Yandere.GallerySource(), // https://yande.re - new Sources.Danbooru.GallerySource(), // https://danbooru.donmai.us - new Sources.Gelbooru.GallerySource() // https://gelbooru.com - }; + public static List GallerySources { get; private set; } public App() { @@ -42,7 +37,7 @@ namespace Gallery private void InitPreference() { Config.Proxy = null; - Config.DownloadThreads = Preferences.Get(Config.DownloadThreadsKey, 1); + Config.DownloadThreads = Preferences.Get(Config.DownloadThreadsKey, 4); var isProxied = Preferences.Get(Config.IsProxiedKey, false); if (isProxied) @@ -109,6 +104,14 @@ namespace Gallery protected override void OnStart() { InitLanguage(); + + GallerySources = new List() + { + new Sources.Yandere.GallerySource(), // https://yande.re + new Sources.Danbooru.GallerySource(), // https://danbooru.donmai.us + new Sources.Gelbooru.GallerySource() // https://gelbooru.com + }; + MainPage = new AppShell(); InitResource(); @@ -117,6 +120,7 @@ namespace Gallery protected override void OnSleep() { + base.OnSleep(); } protected override void OnResume() diff --git a/Gallery.Share/AppShell.xaml b/Gallery.Share/AppShell.xaml index eba9390..61f7234 100644 --- a/Gallery.Share/AppShell.xaml +++ b/Gallery.Share/AppShell.xaml @@ -57,7 +57,7 @@ -