Skip to content

Commit

Permalink
fix: Fix a constant re-creation of TEIDataFragment to show program st…
Browse files Browse the repository at this point in the history
…ages (#3620)
  • Loading branch information
yuzalsif authored May 2, 2024
1 parent 923c0ad commit 6999185
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ class TEIDataFragment : FragmentGlobalAbstract(), TEIDataContracts.View {
private val dashboardViewModel: DashboardViewModel by activityViewModels()
private val dashboardActivity: TEIDataActivityContract by lazy { context as TEIDataActivityContract }

private var showAllEnrollment = false
private var programUid: String? = null

override fun onAttach(context: Context) {
Expand Down Expand Up @@ -139,7 +138,6 @@ class TEIDataFragment : FragmentGlobalAbstract(), TEIDataContracts.View {
}
noEnrollmentSelected.observe(viewLifecycleOwner) { noEnrollmentSelected ->
if (noEnrollmentSelected) {
showAllEnrollment = true
showLegacyCard(dashboardModel.value as DashboardTEIModel)
} else {
showDetailCard()
Expand Down Expand Up @@ -296,9 +294,6 @@ class TEIDataFragment : FragmentGlobalAbstract(), TEIDataContracts.View {
override fun onResume() {
super.onResume()
presenter.init()
if (!showAllEnrollment) {
dashboardViewModel.updateDashboard()
}
}

override fun onPause() {
Expand Down

0 comments on commit 6999185

Please sign in to comment.