Closed shunf4 closed 3 years ago
I was wondering why some icons weren't loading, thanks for finding the cause.
Sadly, having more than one instance of OkHttp is a bad practice. Instantiate an OkHttp client is extensive, it has it own thread pool, etc.
So we need to set the credentials to null before each Glide request. I wonder if Glide provide a callback for this.
This is an annoying issue because as you can't set a retrofit url dynamically, the only way to use one or multiple instance of Retrofit with the same http client is to either rebuild them at each call or set the url at the http client level (for OkHttp with an interceptor).
Sometimes glide requests for feed icon with a wrong URL
https://base-url-of-rss-account/path/to/icon
instead ofhttps://host-of-icon/path/to/icon
becauseAuthInterceptor
has an incorrect state.Using a separate
OkHttpClient
for glide could be better.