increase cache size & dont cache full size media (#710)

main
Konrad Pozniak 6 years ago committed by GitHub
parent 549b527a10
commit 9791899f1b
  1. 1
      app/src/main/java/com/keylesspalace/tusky/fragment/ViewMediaFragment.java
  2. 2
      app/src/main/java/com/keylesspalace/tusky/util/OkHttpUtils.java

@ -209,6 +209,7 @@ public final class ViewMediaFragment extends BaseFragment {
Picasso.with(getContext()) Picasso.with(getContext())
.load(url) .load(url)
.noPlaceholder() .noPlaceholder()
.networkPolicy(NetworkPolicy.NO_STORE)
.into(photoView, new Callback() { .into(photoView, new Callback() {
@Override @Override
public void onSuccess() { public void onSuccess() {

@ -92,7 +92,7 @@ public class OkHttpUtils {
specList.add(fallback); specList.add(fallback);
specList.add(ConnectionSpec.CLEARTEXT); specList.add(ConnectionSpec.CLEARTEXT);
int cacheSize = 10*1024*1024; // 10 MiB int cacheSize = 25*1024*1024; // 25 MiB
OkHttpClient.Builder builder = new OkHttpClient.Builder() OkHttpClient.Builder builder = new OkHttpClient.Builder()
.addInterceptor(getUserAgentInterceptor()) .addInterceptor(getUserAgentInterceptor())

Loading…
Cancel
Save