|
|
|
@ -16,6 +16,7 @@ |
|
|
|
|
package com.keylesspalace.tusky.components.conversation; |
|
|
|
|
|
|
|
|
|
import android.content.Context; |
|
|
|
|
import android.preference.PreferenceManager; |
|
|
|
|
import android.text.InputFilter; |
|
|
|
|
import android.text.TextUtils; |
|
|
|
|
import android.view.View; |
|
|
|
@ -23,11 +24,11 @@ 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.adapter.StatusBaseViewHolder; |
|
|
|
|
import com.keylesspalace.tusky.entity.Attachment; |
|
|
|
|
import com.keylesspalace.tusky.interfaces.StatusActionListener; |
|
|
|
|
import com.keylesspalace.tusky.util.ImageLoadingHelper; |
|
|
|
|
import com.keylesspalace.tusky.util.SmartLengthInputFilter; |
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
@ -44,6 +45,7 @@ public class ConversationViewHolder extends StatusBaseViewHolder { |
|
|
|
|
|
|
|
|
|
private StatusActionListener listener; |
|
|
|
|
private boolean mediaPreviewEnabled; |
|
|
|
|
private boolean animateAvatars; |
|
|
|
|
|
|
|
|
|
ConversationViewHolder(View itemView, |
|
|
|
|
StatusActionListener listener, |
|
|
|
@ -56,6 +58,8 @@ public class ConversationViewHolder extends StatusBaseViewHolder { |
|
|
|
|
|
|
|
|
|
this.listener = listener; |
|
|
|
|
this.mediaPreviewEnabled = mediaPreviewEnabled; |
|
|
|
|
|
|
|
|
|
this.animateAvatars = PreferenceManager.getDefaultSharedPreferences(itemView.getContext()).getBoolean("animateGifAvatars", false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -124,9 +128,7 @@ public class ConversationViewHolder extends StatusBaseViewHolder { |
|
|
|
|
for(int i=0; i < avatars.length; i++) { |
|
|
|
|
ImageView avatarView = avatars[i]; |
|
|
|
|
if(i < accounts.size()) { |
|
|
|
|
Glide.with(avatarView) |
|
|
|
|
.load(accounts.get(i).getAvatar()) |
|
|
|
|
.into(avatarView); |
|
|
|
|
ImageLoadingHelper.loadAvatar(accounts.get(i).getAvatar(), avatarView, avatarRadius48dp, animateAvatars); |
|
|
|
|
avatarView.setVisibility(View.VISIBLE); |
|
|
|
|
} else { |
|
|
|
|
avatarView.setVisibility(View.GONE); |
|
|
|
|