mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Remove group calling tooltip.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user