|
@@ -42,6 +42,8 @@ import java.util.regex.Pattern;
|
|
|
|
|
|
import androidx.annotation.Nullable;
|
|
|
|
|
|
+import androidx.core.content.ContextCompat;
|
|
|
+import androidx.core.content.res.ResourcesCompat;
|
|
|
import androidx.emoji.widget.EmojiTextView;
|
|
|
import butterknife.BindView;
|
|
|
import butterknife.ButterKnife;
|
|
@@ -121,16 +123,18 @@ public class UserItem extends AbstractFlexibleItem<UserItem.UserItemViewHolder>
|
|
|
}
|
|
|
|
|
|
if (!isOnline) {
|
|
|
- if (holder.contactMentionId != null) {
|
|
|
- holder.contactMentionId.setAlpha(0.38f);
|
|
|
- }
|
|
|
- holder.contactDisplayName.setAlpha(0.38f);
|
|
|
+ holder.contactDisplayName.setTextColor(ResourcesCompat.getColor(
|
|
|
+ holder.contactDisplayName.getContext().getResources(),
|
|
|
+ R.color.medium_emphasis_text,
|
|
|
+ null)
|
|
|
+ );
|
|
|
holder.simpleDraweeView.setAlpha(0.38f);
|
|
|
} else {
|
|
|
- if (holder.contactMentionId != null) {
|
|
|
- holder.contactMentionId.setAlpha(1.0f);
|
|
|
- }
|
|
|
- holder.contactDisplayName.setAlpha(1.0f);
|
|
|
+ holder.contactDisplayName.setTextColor(ResourcesCompat.getColor(
|
|
|
+ holder.contactDisplayName.getContext().getResources(),
|
|
|
+ R.color.high_emphasis_text,
|
|
|
+ null)
|
|
|
+ );
|
|
|
holder.simpleDraweeView.setAlpha(1.0f);
|
|
|
}
|
|
|
|
|
@@ -243,7 +247,6 @@ public class UserItem extends AbstractFlexibleItem<UserItem.UserItemViewHolder>
|
|
|
|
|
|
if (!holder.contactMentionId.getText().equals(userType)) {
|
|
|
holder.contactMentionId.setText(userType);
|
|
|
- holder.contactMentionId.setTextColor(NextcloudTalkApplication.Companion.getSharedApplication().getResources().getColor(R.color.textColorMaxContrast));
|
|
|
}
|
|
|
}
|
|
|
}
|