mirror of
https://github.com/bitwarden/mobile.git
synced 2024-12-25 16:47:55 +01:00
try new http client handler for icons
This commit is contained in:
parent
1da94bd9c8
commit
c099f82752
@ -74,6 +74,7 @@
|
||||
<Reference Include="Mono.Android.Export" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
|
@ -16,6 +16,7 @@ using Bit.Droid.Utilities;
|
||||
using Plugin.CurrentActivity;
|
||||
using Plugin.Fingerprint;
|
||||
using Xamarin.Android.Net;
|
||||
using System.Net.Http;
|
||||
#if !FDROID
|
||||
using Android.Gms.Security;
|
||||
#endif
|
||||
@ -78,7 +79,8 @@ namespace Bit.Droid
|
||||
FFImageLoading.ImageService.Instance.Initialize(new FFImageLoading.Config.Configuration
|
||||
{
|
||||
FadeAnimationEnabled = false,
|
||||
FadeAnimationForCachedImages = false
|
||||
FadeAnimationForCachedImages = false,
|
||||
HttpClient = new HttpClient(new AndroidHttpImageClientHandler())
|
||||
});
|
||||
ZXing.Net.Mobile.Forms.Android.Platform.Init();
|
||||
});
|
||||
@ -144,5 +146,15 @@ namespace Bit.Droid
|
||||
Constants.DisableFaviconKey, disableFavicon);
|
||||
await ServiceContainer.Resolve<IEnvironmentService>("environmentService").SetUrlsFromStorageAsync();
|
||||
}
|
||||
|
||||
public class AndroidHttpImageClientHandler : HttpClientHandler
|
||||
{
|
||||
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request,
|
||||
System.Threading.CancellationToken cancellationToken)
|
||||
{
|
||||
request.Version = new Version(1, 0);
|
||||
return await base.SendAsync(request, cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user