diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-06-20 13:55:36 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-06-20 13:55:36 +0300 |
commit | 7ca8fe14a3d63c0ab0f733a79ba1a3c87a47dd59 (patch) | |
tree | 03bbaf67ba097d27fa55c2238e2f42d2b526e4a3 /app/src/main/java/it/niedermann/nextcloud/deck/ui/accountswitcher | |
parent | a914ff3a32f2c5e81178fc60bd29b4c04053609b (diff) |
Move SSO Glide integration into own 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 | 5 |
1 files changed, 2 insertions, 3 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 86c857576..9de4185b1 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,13 +8,12 @@ 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.android.glidesso.SingleSignOnUrl; 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; @@ -31,7 +30,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(new GlideUrl(account.getAvatarUrl(dpToPx(binding.accountItemAvatar.getContext(), R.dimen.avatar_size)), new SingleSignOnOriginHeader(account))) + .load(new SingleSignOnUrl(account.getName(), account.getAvatarUrl(dpToPx(binding.accountItemAvatar.getContext(), R.dimen.avatar_size)))) .error(R.drawable.ic_person_grey600_24dp) .apply(RequestOptions.circleCropTransform()) .into(binding.accountItemAvatar); |