Skip to content
Snippets Groups Projects
Unverified Commit a42ba129 authored by Alex Paulescu's avatar Alex Paulescu Committed by GitHub
Browse files

Made the whole diary card clickable (EXPOSUREAPP-4152) (#1902)

* Made the whole diary card clickable, not just the button.

* Moved diary card setup to separate function to eliminate detekt issues.
parent e8872598
No related branches found
No related tags found
No related merge requests found
...@@ -56,13 +56,13 @@ class HomeFragment : Fragment(R.layout.fragment_home), AutoInject { ...@@ -56,13 +56,13 @@ class HomeFragment : Fragment(R.layout.fragment_home), AutoInject {
} }
setupToolbar() setupToolbar()
setupRiskCard()
setupDiaryCard()
binding.mainTracing.setOnClickListener { binding.mainTracing.setOnClickListener {
doNavigate(HomeFragmentDirections.actionMainFragmentToSettingsTracingFragment()) doNavigate(HomeFragmentDirections.actionMainFragmentToSettingsTracingFragment())
} }
setupRiskCard()
binding.mainAbout.mainCard.apply { binding.mainAbout.mainCard.apply {
setOnClickListener { setOnClickListener {
ExternalActionHelper.openUrl(this@HomeFragment, getString(R.string.main_about_link)) ExternalActionHelper.openUrl(this@HomeFragment, getString(R.string.main_about_link))
...@@ -104,10 +104,6 @@ class HomeFragment : Fragment(R.layout.fragment_home), AutoInject { ...@@ -104,10 +104,6 @@ class HomeFragment : Fragment(R.layout.fragment_home), AutoInject {
} }
vm.observeTestResultToSchedulePositiveTestResultReminder() vm.observeTestResultToSchedulePositiveTestResultReminder()
binding.contactDiaryCard.contactDiaryCardHomescreenButton.setOnClickListener {
vm.moveToContactDiary()
}
} }
override fun onResume() { override fun onResume() {
...@@ -211,6 +207,13 @@ class HomeFragment : Fragment(R.layout.fragment_home), AutoInject { ...@@ -211,6 +207,13 @@ class HomeFragment : Fragment(R.layout.fragment_home), AutoInject {
} }
} }
private fun setupDiaryCard() {
binding.contactDiaryCard.apply {
contactDiaryCardHomescreenButton.setOnClickListener { vm.moveToContactDiary() }
contactDiaryHomescreenCard.setOnClickListener { vm.moveToContactDiary() }
}
}
private fun showRiskLevelLoweredDialog() { private fun showRiskLevelLoweredDialog() {
val riskLevelLoweredDialog = DialogHelper.DialogInstance( val riskLevelLoweredDialog = DialogHelper.DialogInstance(
context = requireActivity(), context = requireActivity(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment