Adjust text story button protections.

This commit is contained in:
Alex Hart
2022-03-28 13:29:22 -03:00
committed by Greyson Parrelli
parent 6476e585c4
commit a3a79fc58d
2 changed files with 37 additions and 15 deletions

View File

@@ -21,7 +21,6 @@ import org.thoughtcrime.securesms.util.navigation.safeNavigate
class TextStoryPostCreationFragment : Fragment(R.layout.stories_text_post_creation_fragment), TextStoryPostTextEntryFragment.Callback {
private lateinit var scene: ConstraintLayout
private lateinit var linkButton: View
private lateinit var backgroundButton: AppCompatImageView
private lateinit var send: View
private lateinit var storyTextPostView: StoryTextPostView
@@ -53,11 +52,13 @@ class TextStoryPostCreationFragment : Fragment(R.layout.stories_text_post_creati
super.onViewCreated(view, savedInstanceState)
scene = view.findViewById(R.id.scene)
linkButton = view.findViewById(R.id.add_link)
backgroundButton = view.findViewById(R.id.background_selector)
send = view.findViewById(R.id.send)
storyTextPostView = view.findViewById(R.id.story_text_post)
val backgroundProtection: View = view.findViewById(R.id.background_protection)
val addLinkProtection: View = view.findViewById(R.id.add_link_protection)
storyTextPostView.showCloseButton()
lifecycleDisposable.bindTo(viewLifecycleOwner)
@@ -97,11 +98,11 @@ class TextStoryPostCreationFragment : Fragment(R.layout.stories_text_post_creati
TextStoryPostTextEntryFragment().show(childFragmentManager, null)
}
backgroundButton.setOnClickListener {
backgroundProtection.setOnClickListener {
viewModel.cycleBackgroundColor()
}
linkButton.setOnClickListener {
addLinkProtection.setOnClickListener {
TextStoryPostLinkEntryFragment().show(childFragmentManager, null)
}