Migrate to Glide (#1175)

* Replace Picasso library with Glide library tuskyapp#1082

* Replace Picasso library with Glide library tuskyapp#1082

* Update load emoji with glide

* Update context used for Glide

* Removed unused import

* Replace deprecated SimpleTarget with CustomTarget

* Fix crash at the view image fragment, remove override image size

* Replace Single.create with Single.fromCallable

* View image fragment refactor

* Fix after merge

* Try to load cached image first and show progress view on failure

* Try to load cached image first and show progress view on failure
This commit is contained in:
pandasoft0 2019-04-16 22:39:12 +03:00 committed by Konrad Pozniak
commit 76ce28980c
32 changed files with 260 additions and 322 deletions

View file

@ -19,15 +19,14 @@ import android.content.Context;
import android.text.InputFilter;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.ToggleButton;
import com.bumptech.glide.Glide;
import com.keylesspalace.tusky.R;
import com.keylesspalace.tusky.interfaces.StatusActionListener;
import com.keylesspalace.tusky.util.SmartLengthInputFilter;
import com.keylesspalace.tusky.viewdata.StatusViewData;
import com.squareup.picasso.Picasso;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
@ -55,7 +54,7 @@ public class StatusViewHolder extends StatusBaseViewHolder {
int padding = Utils.dpToPx(context, 12);
avatar.setPaddingRelative(0, 0, padding, padding);
avatarInset.setVisibility(View.VISIBLE);
Picasso.with(context)
Glide.with(context)
.load(rebloggedUrl)
.placeholder(R.drawable.avatar_default)
.into(avatarInset);