Remove group calling tooltip.

This commit is contained in:
Alex Hart
2023-08-14 13:52:21 -03:00
committed by Clark Chen
parent 31b43e8754
commit c632d8ebec
3 changed files with 0 additions and 38 deletions

View File

@@ -117,7 +117,6 @@ internal object ConversationOptionsMenu {
if (hasActiveGroupCall) {
hideMenuItem(menu, R.id.menu_video_secure)
}
callback.showGroupCallingTooltip()
}
menuInflater.inflate(R.menu.conversation_group_options, menu)
if (!recipient.isPushGroup) {
@@ -301,7 +300,6 @@ internal object ConversationOptionsMenu {
fun handleGoHome()
fun showExpiring(recipient: Recipient)
fun clearExpiring()
fun showGroupCallingTooltip()
fun handleFormatText(@IdRes id: Int)
}
}

View File

@@ -3198,10 +3198,6 @@ class ConversationFragment :
override fun showExpiring(recipient: Recipient) = Unit
override fun clearExpiring() = Unit
override fun showGroupCallingTooltip() {
conversationTooltips.displayGroupCallingTooltip(requireView().findViewById(R.id.menu_video_secure))
}
override fun handleFormatText(id: Int) {
composeText.handleFormatText(id)
}

View File

@@ -8,7 +8,6 @@ import androidx.lifecycle.ViewModel
import org.signal.core.util.logging.Log
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.components.TooltipPopup
import org.thoughtcrime.securesms.keyvalue.SignalStore
import org.thoughtcrime.securesms.stickers.StickerPackInstallEvent
import org.thoughtcrime.securesms.util.TextSecurePreferences
@@ -22,37 +21,6 @@ class ConversationTooltips(fragment: Fragment) {
private val viewModel: TooltipViewModel by fragment.viewModels()
/**
* Displays the tooltip notifying the user that they can begin a group call. Also
* performs the necessary record-keeping and checks to ensure we don't display it
* if we shouldn't. There is a set of callbacks which should be used to preserve
* session state for this tooltip.
*
* @param anchor The view this will be displayed underneath. If the view is not ready, we will skip.
*/
fun displayGroupCallingTooltip(
anchor: View?
) {
if (viewModel.hasDisplayedCallingTooltip || !SignalStore.tooltips().shouldShowGroupCallingTooltip()) {
return
}
if (anchor == null) {
Log.w(TAG, "Group calling tooltip anchor is null. Skipping tooltip.")
return
}
viewModel.hasDisplayedCallingTooltip = true
SignalStore.tooltips().markGroupCallSpeakerViewSeen()
TooltipPopup.forTarget(anchor)
.setBackgroundTint(ContextCompat.getColor(anchor.context, R.color.signal_accent_green))
.setTextColor(ContextCompat.getColor(anchor.context, R.color.core_white))
.setText(R.string.ConversationActivity__tap_here_to_start_a_group_call)
.setOnDismissListener { SignalStore.tooltips().markGroupCallingTooltipSeen() }
.show(TooltipPopup.POSITION_BELOW)
}
/**
* Displayed to teach the user about sticker packs
*/