mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-23 03:05:26 +00:00
Update colors for scroll-to buttons to match material3 spec.
This commit is contained in:
@@ -46,6 +46,14 @@ public final class ConversationScrollToView extends FrameLayout {
|
||||
}
|
||||
}
|
||||
|
||||
public void setWallpaperEnabled(boolean hasWallpaper) {
|
||||
if (hasWallpaper) {
|
||||
scrollButton.setBackgroundResource(R.drawable.scroll_to_bottom_background_wallpaper);
|
||||
} else {
|
||||
scrollButton.setBackgroundResource(R.drawable.scroll_to_bottom_background_normal);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUnreadCountBackgroundTint(@ColorInt int tint) {
|
||||
unreadCount.getBackground().setColorFilter(new SimpleColorFilter(tint));
|
||||
}
|
||||
|
||||
@@ -377,7 +377,11 @@ public class ConversationFragment extends LoggingFragment implements Multiselect
|
||||
presentConversationMetadata(messageData.getMetadata());
|
||||
}));
|
||||
|
||||
disposables.add(conversationViewModel.getWallpaper().subscribe(w -> chatWallpaper = w.orElse(null)));
|
||||
disposables.add(conversationViewModel.getWallpaper().subscribe(w -> {
|
||||
chatWallpaper = w.orElse(null);
|
||||
scrollToBottomButton.setWallpaperEnabled(w.isPresent());
|
||||
scrollToMentionButton.setWallpaperEnabled(w.isPresent());
|
||||
}));
|
||||
|
||||
conversationViewModel.getShowMentionsButton().observe(getViewLifecycleOwner(), shouldShow -> {
|
||||
if (shouldShow) {
|
||||
|
||||
Reference in New Issue
Block a user