Loading app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFragment.kt +12 −3 Original line number Diff line number Diff line Loading @@ -63,8 +63,15 @@ class DashboardFragment : private lateinit var graphHolder: GraphHolder private lateinit var binding: FragmentDashboardBinding private var updateUIJob: Job? = null override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) updateUIJob = lifecycleScope.launchWhenStarted { viewModel.dashboardFeature.takeView(this, this@DashboardFragment) } lifecycleScope.launchWhenStarted { viewModel.dashboardFeature.singleEvents.collect { event -> when (event) { Loading Loading @@ -128,12 +135,14 @@ class DashboardFragment : } } private var updateUIJob: Job? = null override fun onResume() { super.onResume() if (updateUIJob == null || updateUIJob?.isActive == false) { updateUIJob = lifecycleScope.launch { viewModel.dashboardFeature.takeView(this, this@DashboardFragment) } } viewModel.submitAction(DashboardFeature.Action.FetchStatistics) } Loading Loading
app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFragment.kt +12 −3 Original line number Diff line number Diff line Loading @@ -63,8 +63,15 @@ class DashboardFragment : private lateinit var graphHolder: GraphHolder private lateinit var binding: FragmentDashboardBinding private var updateUIJob: Job? = null override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) updateUIJob = lifecycleScope.launchWhenStarted { viewModel.dashboardFeature.takeView(this, this@DashboardFragment) } lifecycleScope.launchWhenStarted { viewModel.dashboardFeature.singleEvents.collect { event -> when (event) { Loading Loading @@ -128,12 +135,14 @@ class DashboardFragment : } } private var updateUIJob: Job? = null override fun onResume() { super.onResume() if (updateUIJob == null || updateUIJob?.isActive == false) { updateUIJob = lifecycleScope.launch { viewModel.dashboardFeature.takeView(this, this@DashboardFragment) } } viewModel.submitAction(DashboardFeature.Action.FetchStatistics) } Loading