Skip to content

Commit

Permalink
Inline the group call reactions feature flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholas-signal authored and greyson-signal committed Apr 29, 2024
1 parent f23476a commit d20f588
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,10 @@ class CallOverflowPopupWindow(private val activity: FragmentActivity, parentView

init {
val root = (contentView as LinearLayout)
if (FeatureFlags.groupCallReactions()) {
val reactionScrubber = root.findViewById<CallReactionScrubber>(R.id.reaction_scrubber)
reactionScrubber.visible = true
reactionScrubber.initialize(activity.supportFragmentManager) {
ApplicationDependencies.getSignalCallManager().react(it)
dismiss()
}
val reactionScrubber = root.findViewById<CallReactionScrubber>(R.id.reaction_scrubber)
reactionScrubber.initialize(activity.supportFragmentManager) {
ApplicationDependencies.getSignalCallManager().react(it)
dismiss()
}
if (FeatureFlags.groupCallRaiseHand()) {
val raiseHand = root.findViewById<ConstraintLayout>(R.id.raise_hand_layout_parent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public boolean displayEndCall() {
}

public boolean displayOverflow() {
return (FeatureFlags.groupCallReactions() || FeatureFlags.groupCallRaiseHand()) && isAtLeastOutgoing() && hasAtLeastOneRemote && isGroupCall();
return isAtLeastOutgoing() && hasAtLeastOneRemote && isGroupCall();
}

public boolean displayMuteAudio() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -917,9 +917,7 @@ public void onLowBandwidthForVideo(@NonNull GroupCall groupCall, boolean recover

@Override
public void onReactions(@NonNull GroupCall groupCall, List<Reaction> reactions) {
if (FeatureFlags.groupCallReactions()) {
processStateless(s -> serviceState.getActionProcessor().handleGroupCallReaction(serviceState, s, reactions));
}
processStateless(s -> serviceState.getActionProcessor().handleGroupCallReaction(serviceState, s, reactions));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ public final class FeatureFlags {
private static final String IDEAL_DONATIONS = "android.ideal.donations.5";
public static final String IDEAL_ENABLED_REGIONS = "global.donations.idealEnabledRegions";
public static final String SEPA_ENABLED_REGIONS = "global.donations.sepaEnabledRegions";
private static final String CALLING_REACTIONS = "android.calling.reactions";
private static final String NOTIFICATION_THUMBNAIL_BLOCKLIST = "android.notificationThumbnailProductBlocklist";
private static final String CALLING_RAISE_HAND = "android.calling.raiseHand";
private static final String USE_ACTIVE_CALL_MANAGER = "android.calling.useActiveCallManager.5";
Expand Down Expand Up @@ -197,7 +196,6 @@ public final class FeatureFlags {
IDEAL_DONATIONS,
IDEAL_ENABLED_REGIONS,
SEPA_ENABLED_REGIONS,
CALLING_REACTIONS,
NOTIFICATION_THUMBNAIL_BLOCKLIST,
CALLING_RAISE_HAND,
USE_ACTIVE_CALL_MANAGER,
Expand Down Expand Up @@ -278,7 +276,6 @@ public final class FeatureFlags {
PROMPT_FOR_NOTIFICATION_CONFIG,
PROMPT_BATTERY_SAVER,
CRASH_PROMPT_CONFIG,
CALLING_REACTIONS,
NOTIFICATION_THUMBNAIL_BLOCKLIST,
CALLING_RAISE_HAND,
VIDEO_RECORD_1X_ZOOM,
Expand Down Expand Up @@ -679,13 +676,6 @@ public static String sepaEnabledRegions() {
return getString(SEPA_ENABLED_REGIONS, "");
}

/**
* Whether or not group call reactions are enabled.
*/
public static boolean groupCallReactions() {
return getBoolean(CALLING_REACTIONS, false);
}

/**
* Whether or not group call raise hand is enabled.
*/
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/call_overflow_holder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/calling_reaction_emoji_height"
android:background="@drawable/conversation_reaction_overlay_background"
android:elevation="4dp"
android:visibility="gone" />
android:elevation="4dp"/>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/raise_hand_layout_parent"
Expand Down

0 comments on commit d20f588

Please sign in to comment.