fix: option proxy save error

This commit is contained in:
2020-05-19 16:03:25 +08:00
parent ced3a33034
commit 8381e71a45
5 changed files with 9 additions and 13 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0.518" package="org.tsanie.pixiview" android:versionCode="7"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0.519" package="org.tsanie.pixiview" android:versionCode="8">
<uses-sdk android:minSdkVersion="25" android:targetSdkVersion="28" /> <uses-sdk android:minSdkVersion="25" android:targetSdkVersion="28" />
<application android:label="Pixiview" android:icon="@mipmap/icon" android:roundIcon="@mipmap/icon_round"></application> <application android:label="Pixiview" android:icon="@mipmap/icon" android:roundIcon="@mipmap/icon_round"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

View File

@ -29,8 +29,8 @@
<string>com.apple.share-services</string> <string>com.apple.share-services</string>
</dict> </dict>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.0.518</string> <string>1.0.519</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>7</string> <string>8</string>
</dict> </dict>
</plist> </plist>

View File

@ -79,8 +79,8 @@
</dict> </dict>
</array> </array>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.0.518</string> <string>1.0.519</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>7</string> <string>8</string>
</dict> </dict>
</plist> </plist>

View File

@ -136,12 +136,14 @@ namespace Pixiview
} }
else if (proxy != null) else if (proxy != null)
{ {
Preferences.Set(Configs.HostKey, false); Preferences.Set(Configs.IsProxiedKey, false);
Preferences.Set(Configs.HostKey, h);
if (pt > 0) if (pt > 0)
{ {
Preferences.Set(Configs.PortKey, pt); Preferences.Set(Configs.PortKey, pt);
} }
Configs.Proxy = null; Configs.Proxy = null;
App.DebugPrint("clear proxy");
} }
var cookie = Cookie; var cookie = Cookie;

View File

@ -470,6 +470,7 @@ namespace Pixiview.Utils
var height = cgImage.Height; var height = cgImage.Height;
var bitsPerComponent = cgImage.BitsPerComponent; var bitsPerComponent = cgImage.BitsPerComponent;
var bytesPerRow = cgImage.BytesPerRow; var bytesPerRow = cgImage.BytesPerRow;
// padding to 64
var bytes = bytesPerRow >> 6 << 6; var bytes = bytesPerRow >> 6 << 6;
if (bytes < bytesPerRow) if (bytes < bytesPerRow)
{ {
@ -486,13 +487,6 @@ namespace Pixiview.Utils
$"calculated: {bytesPerRow} => {bytes}"); $"calculated: {bytesPerRow} => {bytes}");
} }
#endif #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( using (CGBitmapContext bitmapContext = new CGBitmapContext(
pxdata, width, height, pxdata, width, height,
bitsPerComponent, bitsPerComponent,