From 8381e71a457c06e57391877fabd1334d2694730b Mon Sep 17 00:00:00 2001 From: Tsanie Lily Date: Tue, 19 May 2020 16:03:25 +0800 Subject: [PATCH] fix: option proxy save error --- Pixiview.Android/Properties/AndroidManifest.xml | 2 +- Pixiview.iOS.OpenExtension/Info.plist | 4 ++-- Pixiview.iOS/Info.plist | 4 ++-- Pixiview/OptionPage.xaml.cs | 4 +++- Pixiview/Utils/Ugoira.cs | 8 +------- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Pixiview.Android/Properties/AndroidManifest.xml b/Pixiview.Android/Properties/AndroidManifest.xml index 40ffc34..1092bec 100644 --- a/Pixiview.Android/Properties/AndroidManifest.xml +++ b/Pixiview.Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + diff --git a/Pixiview.iOS.OpenExtension/Info.plist b/Pixiview.iOS.OpenExtension/Info.plist index 97bb1ee..68abcd0 100644 --- a/Pixiview.iOS.OpenExtension/Info.plist +++ b/Pixiview.iOS.OpenExtension/Info.plist @@ -29,8 +29,8 @@ com.apple.share-services CFBundleShortVersionString - 1.0.518 + 1.0.519 CFBundleVersion - 7 + 8 diff --git a/Pixiview.iOS/Info.plist b/Pixiview.iOS/Info.plist index 2d7f09c..0c9e7bd 100644 --- a/Pixiview.iOS/Info.plist +++ b/Pixiview.iOS/Info.plist @@ -79,8 +79,8 @@ CFBundleShortVersionString - 1.0.518 + 1.0.519 CFBundleVersion - 7 + 8 diff --git a/Pixiview/OptionPage.xaml.cs b/Pixiview/OptionPage.xaml.cs index 3be672d..f00a9a0 100644 --- a/Pixiview/OptionPage.xaml.cs +++ b/Pixiview/OptionPage.xaml.cs @@ -136,12 +136,14 @@ namespace Pixiview } else if (proxy != null) { - Preferences.Set(Configs.HostKey, false); + Preferences.Set(Configs.IsProxiedKey, false); + Preferences.Set(Configs.HostKey, h); if (pt > 0) { Preferences.Set(Configs.PortKey, pt); } Configs.Proxy = null; + App.DebugPrint("clear proxy"); } var cookie = Cookie; diff --git a/Pixiview/Utils/Ugoira.cs b/Pixiview/Utils/Ugoira.cs index 05ee50e..f648af9 100644 --- a/Pixiview/Utils/Ugoira.cs +++ b/Pixiview/Utils/Ugoira.cs @@ -470,6 +470,7 @@ namespace Pixiview.Utils var height = cgImage.Height; var bitsPerComponent = cgImage.BitsPerComponent; var bytesPerRow = cgImage.BytesPerRow; + // padding to 64 var bytes = bytesPerRow >> 6 << 6; if (bytes < bytesPerRow) { @@ -486,13 +487,6 @@ namespace Pixiview.Utils $"calculated: {bytesPerRow} => {bytes}"); } #endif - //var scan = cgImage.BytesPerRow; - //var mod = scan % 16; - //if (mod > 0) - //{ - // App.DebugPrint($"add more {mod} bytes to align line from {scan} to {scan + mod}."); - // scan += mod; - //} using (CGBitmapContext bitmapContext = new CGBitmapContext( pxdata, width, height, bitsPerComponent,