diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-06-17 18:58:00 +0300 |
---|---|---|
committer | Niedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com> | 2020-06-17 19:14:01 +0300 |
commit | a220f84861447cfd860fd2b5110b28501903efcf (patch) | |
tree | edc39b0d24ae4af5330fc75f7bf6d1da0ee28db5 /app/src/main/java/it/niedermann/nextcloud/deck/ui/accountswitcher | |
parent | f0c884f2e3c9accef8564beabd8f0932117d72d9 (diff) |
Fix #531 Issue with Glide SSO module
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/accountswitcher')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/accountswitcher/AccountSwitcherViewHolder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/accountswitcher/AccountSwitcherViewHolder.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/accountswitcher/AccountSwitcherViewHolder.java index b108553bc..86c857576 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/accountswitcher/AccountSwitcherViewHolder.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/accountswitcher/AccountSwitcherViewHolder.java @@ -8,11 +8,13 @@ import androidx.core.util.Consumer; import androidx.recyclerview.widget.RecyclerView; import com.bumptech.glide.Glide; +import com.bumptech.glide.load.model.GlideUrl; import com.bumptech.glide.request.RequestOptions; import it.niedermann.nextcloud.deck.R; import it.niedermann.nextcloud.deck.databinding.ItemAccountChooseBinding; import it.niedermann.nextcloud.deck.model.Account; +import it.niedermann.nextcloud.deck.util.glide.SingleSignOnOriginHeader; import static it.niedermann.nextcloud.deck.util.DimensionUtil.dpToPx; @@ -29,7 +31,7 @@ public class AccountSwitcherViewHolder extends RecyclerView.ViewHolder { binding.accountName.setText(account.getUserName()); binding.accountHost.setText(Uri.parse(account.getUrl()).getHost()); Glide.with(itemView.getContext()) - .load(account.getAvatarUrl(dpToPx(binding.accountItemAvatar.getContext(), R.dimen.avatar_size))) + .load(new GlideUrl(account.getAvatarUrl(dpToPx(binding.accountItemAvatar.getContext(), R.dimen.avatar_size)), new SingleSignOnOriginHeader(account))) .error(R.drawable.ic_person_grey600_24dp) .apply(RequestOptions.circleCropTransform()) .into(binding.accountItemAvatar); |