Add new background for tooltip and always display.
This commit is contained in:
parent
d62ff6ca06
commit
ffd60af3ff
2 changed files with 5 additions and 32 deletions
|
@ -360,18 +360,10 @@ class MultiselectForwardFragment :
|
|||
@Suppress("NON_EXHAUSTIVE_WHEN_STATEMENT")
|
||||
when (storySendRequirements) {
|
||||
Stories.MediaTransform.SendRequirements.REQUIRES_CLIP -> {
|
||||
if (!SignalStore.storyValues().videoTooltipSeen) {
|
||||
displayTooltip(view, R.string.MultiselectForwardFragment__videos_will_be_trimmed) {
|
||||
SignalStore.storyValues().videoTooltipSeen = true
|
||||
}
|
||||
}
|
||||
displayTooltip(view, R.string.MultiselectForwardFragment__videos_will_be_trimmed)
|
||||
}
|
||||
Stories.MediaTransform.SendRequirements.CAN_NOT_SEND -> {
|
||||
if (!SignalStore.storyValues().cannotSendTooltipSeen) {
|
||||
displayTooltip(view, R.string.MultiselectForwardFragment__videos_sent_to_stories_cant) {
|
||||
SignalStore.storyValues().cannotSendTooltipSeen = true
|
||||
}
|
||||
}
|
||||
displayTooltip(view, R.string.MultiselectForwardFragment__videos_sent_to_stories_cant)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -379,15 +371,12 @@ class MultiselectForwardFragment :
|
|||
return resultsSet.toSet()
|
||||
}
|
||||
|
||||
private fun displayTooltip(anchor: View, @StringRes text: Int, onDismiss: () -> Unit) {
|
||||
private fun displayTooltip(anchor: View, @StringRes text: Int) {
|
||||
TooltipPopup
|
||||
.forTarget(anchor)
|
||||
.setText(text)
|
||||
.setTextColor(ContextCompat.getColor(requireContext(), R.color.signal_colorOnPrimary))
|
||||
.setBackgroundTint(ContextCompat.getColor(requireContext(), R.color.signal_colorPrimary))
|
||||
.setOnDismissListener {
|
||||
onDismiss()
|
||||
}
|
||||
.setTextColor(ContextCompat.getColor(requireContext(), R.color.signal_colorOnPrimaryContainer))
|
||||
.setBackgroundTint(ContextCompat.getColor(requireContext(), R.color.signal_colorPrimaryContainer))
|
||||
.show(TooltipPopup.POSITION_BELOW)
|
||||
}
|
||||
|
||||
|
|
|
@ -25,16 +25,6 @@ internal class StoryValues(store: KeyValueStore) : SignalStoreValues(store) {
|
|||
*/
|
||||
private const val LATEST_STORY_SENDS = "latest.story.sends"
|
||||
|
||||
/**
|
||||
* Video Trim tooltip marker
|
||||
*/
|
||||
private const val VIDEO_TOOLTIP_SEEN_MARKER = "stories.video.will.be.trimmed.tooltip.seen"
|
||||
|
||||
/**
|
||||
* Cannot send to story tooltip marker
|
||||
*/
|
||||
private const val CANNOT_SEND_SEEN_MARKER = "stories.cannot.send.video.tooltip.seen"
|
||||
|
||||
/**
|
||||
* Whether or not the user has see the "Navigation education" view
|
||||
*/
|
||||
|
@ -56,8 +46,6 @@ internal class StoryValues(store: KeyValueStore) : SignalStoreValues(store) {
|
|||
override fun getKeysToIncludeInBackup(): MutableList<String> = mutableListOf(
|
||||
MANUAL_FEATURE_DISABLE,
|
||||
USER_HAS_ADDED_TO_A_STORY,
|
||||
VIDEO_TOOLTIP_SEEN_MARKER,
|
||||
CANNOT_SEND_SEEN_MARKER,
|
||||
USER_HAS_SEEN_FIRST_NAV_VIEW,
|
||||
HAS_DOWNLOADED_ONBOARDING_STORY
|
||||
)
|
||||
|
@ -68,10 +56,6 @@ internal class StoryValues(store: KeyValueStore) : SignalStoreValues(store) {
|
|||
|
||||
var userHasBeenNotifiedAboutStories: Boolean by booleanValue(USER_HAS_ADDED_TO_A_STORY, false)
|
||||
|
||||
var videoTooltipSeen by booleanValue(VIDEO_TOOLTIP_SEEN_MARKER, false)
|
||||
|
||||
var cannotSendTooltipSeen by booleanValue(CANNOT_SEND_SEEN_MARKER, false)
|
||||
|
||||
var userHasSeenFirstNavView: Boolean by booleanValue(USER_HAS_SEEN_FIRST_NAV_VIEW, false)
|
||||
|
||||
var hasDownloadedOnboardingStory: Boolean by booleanValue(HAS_DOWNLOADED_ONBOARDING_STORY, false)
|
||||
|
|
Loading…
Add table
Reference in a new issue