diff --git a/app/src/main/java/com/apps/adrcotfas/goodtime/backup/BackupFragment.kt b/app/src/main/java/com/apps/adrcotfas/goodtime/backup/BackupFragment.kt index 7cb34d1a..f30170c9 100644 --- a/app/src/main/java/com/apps/adrcotfas/goodtime/backup/BackupFragment.kt +++ b/app/src/main/java/com/apps/adrcotfas/goodtime/backup/BackupFragment.kt @@ -80,18 +80,18 @@ class BackupFragment : BottomSheetDialogFragment() { private fun exportCsv() { val sessionsLiveData = sessionViewModel.allSessions - sessionsLiveData.observe(viewLifecycleOwner, { sessions: List -> + sessionsLiveData.observe(viewLifecycleOwner) { sessions: List -> if (sessions.isEmpty()) { - Toast.makeText( - requireActivity(), - R.string.backup_no_completed_sessions, - Toast.LENGTH_SHORT - ).show() + Toast.makeText( + requireActivity(), + R.string.backup_no_completed_sessions, + Toast.LENGTH_SHORT + ).show() dismiss() } else { BackupOperations.doExportToCSV(lifecycleScope, requireContext(), sessions) } - }) + } } companion object { diff --git a/app/src/main/java/com/apps/adrcotfas/goodtime/statistics/all_sessions/AllSessionsFragment.kt b/app/src/main/java/com/apps/adrcotfas/goodtime/statistics/all_sessions/AllSessionsFragment.kt index a138e1a7..1d1b7f49 100644 --- a/app/src/main/java/com/apps/adrcotfas/goodtime/statistics/all_sessions/AllSessionsFragment.kt +++ b/app/src/main/java/com/apps/adrcotfas/goodtime/statistics/all_sessions/AllSessionsFragment.kt @@ -82,12 +82,12 @@ class AllSessionsFragment : Fragment(), OnLabelSelectedListener { val view = binding.root mRecyclerView = binding.mainRecylcerView mRecyclerView!!.layoutManager = LinearLayoutManager(activity, RecyclerView.VERTICAL, false) - labelsViewModel.labels.observe(viewLifecycleOwner, { labels: List