mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Improve group call reactions UI when presented without raise hand.
This also dismisses the custom reaction picker when switching to PiP mode.
This commit is contained in:
@@ -30,7 +30,6 @@ class CallOverflowPopupWindow(private val activity: FragmentActivity, parentView
|
||||
LayoutInflater.from(activity).inflate(R.layout.call_overflow_holder, parentViewGroup, false),
|
||||
activity.resources.getDimension(R.dimen.calling_reaction_popup_menu_width).toInt(),
|
||||
activity.resources.getDimension(R.dimen.calling_reaction_popup_menu_height).toInt()
|
||||
|
||||
) {
|
||||
private val raiseHandLabel: TextView = (contentView as LinearLayout).findViewById(R.id.raise_hand_label)
|
||||
|
||||
|
||||
@@ -20,6 +20,16 @@ class CallReactionScrubber @JvmOverloads constructor(
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
companion object {
|
||||
const val CUSTOM_REACTION_BOTTOM_SHEET_TAG = "CallReaction"
|
||||
|
||||
@JvmStatic
|
||||
fun dismissCustomEmojiBottomSheet(fm: FragmentManager) {
|
||||
val bottomSheet = fm.findFragmentByTag(CUSTOM_REACTION_BOTTOM_SHEET_TAG) as? ReactWithAnyEmojiBottomSheetDialogFragment
|
||||
|
||||
bottomSheet?.dismissNow()
|
||||
}
|
||||
}
|
||||
|
||||
private val emojiViews: Array<EmojiImageView>
|
||||
private var customEmojiIndex = 0
|
||||
@@ -48,7 +58,7 @@ class CallReactionScrubber @JvmOverloads constructor(
|
||||
view.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.ic_any_emoji_32))
|
||||
view.setOnClickListener {
|
||||
val bottomSheet = ReactWithAnyEmojiBottomSheetDialogFragment.createForCallingReactions()
|
||||
bottomSheet.show(fragmentManager, "CallReaction")
|
||||
bottomSheet.show(fragmentManager, CUSTOM_REACTION_BOTTOM_SHEET_TAG)
|
||||
}
|
||||
} else {
|
||||
val preferredVariation = SignalStore.emojiValues().getPreferredVariation(emojis[i])
|
||||
|
||||
Reference in New Issue
Block a user