Set background of typing indicator to match conversation.

This commit is contained in:
Alex Hart
2021-05-26 10:56:09 -03:00
parent ba510ca77d
commit 03c19f54c2
5 changed files with 10 additions and 6 deletions

View File

@@ -36,7 +36,7 @@ public class ConversationTypingView extends LinearLayout {
indicator = findViewById(R.id.typing_indicator);
}
public void setTypists(@NonNull GlideRequests glideRequests, @NonNull List<Recipient> typists, boolean isGroupThread) {
public void setTypists(@NonNull GlideRequests glideRequests, @NonNull List<Recipient> typists, boolean isGroupThread, boolean hasWallpaper) {
if (typists.isEmpty()) {
indicator.stopAnimation();
return;
@@ -51,6 +51,12 @@ public class ConversationTypingView extends LinearLayout {
avatar.setVisibility(GONE);
}
if (hasWallpaper) {
bubble.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.conversation_item_wallpaper_bubble_color));
} else {
bubble.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.signal_background_secondary));
}
indicator.startAnimation();
}
}

View File

@@ -701,7 +701,8 @@ public class ConversationFragment extends LoggingFragment {
replacedByIncomingMessage = false;
}
typingView.setTypists(GlideApp.with(ConversationFragment.this), recipients, recipient.get().isGroup());
Recipient resolved = recipient.get();
typingView.setTypists(GlideApp.with(ConversationFragment.this), recipients, resolved.isGroup(), resolved.hasWallpaper());
ConversationAdapter adapter = getListAdapter();