Skip to content

Commit

Permalink
Spikeysanju#52 ready for pull
Browse files Browse the repository at this point in the history
  • Loading branch information
maifeeulasad committed Mar 19, 2021
1 parent 7331969 commit 3d02dde
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ class MainActivity : AppCompatActivity() {
*/
viewModel


// Set the item state
lifecycleScope.launchWhenStarted {
if(settingsViewModel.bioMetricPreference.first())
authenticate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import kotlinx.coroutines.flow.first
@AndroidEntryPoint
class SettingsFragment : BaseFragment<FragmentSettingsBinding, SettingsViewModel>() {
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()
Expand All @@ -31,7 +31,6 @@ class SettingsFragment : BaseFragment<FragmentSettingsBinding, SettingsViewModel
biometric.setOnCheckedChangeListener { _, biometricEnabled ->
viewModel.setBioMetricLock(biometricEnabled)
}

}

override fun getViewBinding(inflater: LayoutInflater, container: ViewGroup?) =
Expand Down

0 comments on commit 3d02dde

Please sign in to comment.