From 3d02dde659ce98e00444510b2f20328d5536f966 Mon Sep 17 00:00:00 2001 From: maifeeulasad Date: Fri, 19 Mar 2021 14:13:07 +0600 Subject: [PATCH] #52 ready for pull --- .../dev/spikeysanju/expensetracker/view/main/MainActivity.kt | 2 -- .../expensetracker/view/settings/SettingsFragment.kt | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/main/java/dev/spikeysanju/expensetracker/view/main/MainActivity.kt b/app/src/main/java/dev/spikeysanju/expensetracker/view/main/MainActivity.kt index b4293df..2b0f075 100644 --- a/app/src/main/java/dev/spikeysanju/expensetracker/view/main/MainActivity.kt +++ b/app/src/main/java/dev/spikeysanju/expensetracker/view/main/MainActivity.kt @@ -52,8 +52,6 @@ class MainActivity : AppCompatActivity() { */ viewModel - - // Set the item state lifecycleScope.launchWhenStarted { if(settingsViewModel.bioMetricPreference.first()) authenticate() diff --git a/app/src/main/java/dev/spikeysanju/expensetracker/view/settings/SettingsFragment.kt b/app/src/main/java/dev/spikeysanju/expensetracker/view/settings/SettingsFragment.kt index ec9ca26..561b73c 100644 --- a/app/src/main/java/dev/spikeysanju/expensetracker/view/settings/SettingsFragment.kt +++ b/app/src/main/java/dev/spikeysanju/expensetracker/view/settings/SettingsFragment.kt @@ -15,10 +15,10 @@ import kotlinx.coroutines.flow.first @AndroidEntryPoint class SettingsFragment : BaseFragment() { override val viewModel: SettingsViewModel by viewModels() + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - // Set the item state lifecycleScope.launchWhenStarted { binding.biometric.isChecked = viewModel.bioMetricPreference.first() @@ -31,7 +31,6 @@ class SettingsFragment : BaseFragment viewModel.setBioMetricLock(biometricEnabled) } - } override fun getViewBinding(inflater: LayoutInflater, container: ViewGroup?) =