Skip to content

Commit

Permalink
lints
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosKozak committed Aug 9, 2023
1 parent 1d0da28 commit 911c446
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
7 changes: 7 additions & 0 deletions .idea/dictionaries/project_dictionary.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class DetailedBolusInfoStorageImpl @Inject constructor(

private fun loadStore(): ArrayList<DetailedBolusInfo> {
val jsonString = sp.getString(rh.gs(R.string.key_bolus_storage), "")
return if (jsonString != null && jsonString.isNotEmpty()) {
return if (jsonString.isNotEmpty()) {
val type = object : TypeToken<List<DetailedBolusInfo>>() {}.type
Gson().fromJson(jsonString, type)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class MedtrumOverviewFragment : MedtrumBaseFragment<FragmentMedtrumOverviewBindi
super.onViewCreated(view, savedInstanceState)

binding.apply {
viewmodel = ViewModelProvider(this@MedtrumOverviewFragment, viewModelFactory).get(MedtrumOverviewViewModel::class.java)
viewmodel = ViewModelProvider(this@MedtrumOverviewFragment, viewModelFactory)[MedtrumOverviewViewModel::class.java]
viewmodel?.apply {
eventHandler.observe(viewLifecycleOwner) { evt ->
when (evt.peekContent()) {
Expand Down Expand Up @@ -65,19 +65,9 @@ class MedtrumOverviewFragment : MedtrumBaseFragment<FragmentMedtrumOverviewBindi
}

EventType.PROFILE_NOT_SET -> ToastUtils.infoToast(requireContext(), R.string.no_profile_selected)

else -> Unit
}
}
}
}
}

override fun onPause() {
super.onPause()
}

override fun onResume() {
super.onResume()
}
}

0 comments on commit 911c446

Please sign in to comment.