package org.cnodejs.util;

import android.widget.ImageView;

import com.squareup.picasso.Picasso;

import org.cnodejs.BuildConfig;

public class ImageLoader {

    public static void load(ImageView view, String url) {
        if (url.startsWith("//")) {
            url = "https:" + url;
        }

        Picasso picasso = Picasso.with(view.getContext());
        picasso.setLoggingEnabled(BuildConfig.DEBUG);
        picasso.load(url).into(view);
    }

}

@@ -292,16 +292,274 @@
      %7D%0A%0A
+        // TODO: %E6%9A%82%E6%97%B6%E7%9A%84 workaround%EF%BC%8C %E6%9C%AA%E5%81%9A%E4%BB%94%E7%BB%86%E5%A4%84%E7%90%86%0A        // %E5%B0%86 Gravatar %E9%BB%98%E8%AE%A4%E7%9A%84 48x48 %E6%9B%BF%E6%8D%A2%E6%88%90 120x120%EF%BC%88%E6%8C%89%E6%88%91%E4%BB%AC%E7%9A%84 ImageView %E5%A4%A7%E5%B0%8F%E6%98%AF 40dp%EF%BC%8Cxxhdpi %E5%88%86%E8%BE%A8%E7%8E%87%E8%AE%A1%E7%AE%97%EF%BC%89%0A        if (url.contains(%22gravatar.com%22) && url.contains(%22size=48%22)) %7B%0A            url = url.replace(%22size=48%22, %22size=120%22);%0A        %7D%0A%0A
         

改善 Gravatar 头像的清晰度