mirror of
https://github.com/bitwarden/mobile
synced 2025-12-10 13:23:39 +00:00
try new http client handler for icons
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user