mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-24 11:45:28 +00:00
Set background of typing indicator to match conversation.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -33,8 +33,7 @@
|
||||
<FrameLayout
|
||||
android:id="@+id/typing_bubble"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/conversation_typing_indicator_bg">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<org.thoughtcrime.securesms.components.TypingIndicatorView
|
||||
android:id="@+id/typing_indicator"
|
||||
|
||||
@@ -134,7 +134,6 @@
|
||||
<color name="settings_ripple_color">@color/transparent_white_10</color>
|
||||
|
||||
<color name="quote_view_background">@color/transparent_black_40</color>
|
||||
<color name="conversation_typing_indicator_bg">@color/core_grey_25</color>
|
||||
<color name="conversation_item_outgoing_footer_fg">@color/transparent_white_60</color>
|
||||
<color name="quote_preview_background">@color/core_grey_80</color>
|
||||
</resources>
|
||||
|
||||
@@ -134,7 +134,6 @@
|
||||
<color name="settings_ripple_color">@color/transparent_black_10</color>
|
||||
|
||||
<color name="quote_view_background">@color/transparent_white_60</color>
|
||||
<color name="conversation_typing_indicator_bg">@color/core_grey_60</color>
|
||||
<color name="conversation_item_outgoing_footer_fg">@color/transparent_white_80</color>
|
||||
<color name="quote_preview_background">@color/core_grey_15</color>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user