Skip to content

Commit

Permalink
[#3871] Remove CalculatorFragment navigation result logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaozhan committed Sep 8, 2024
1 parent 284bfe9 commit 65a5572
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import com.oztechan.ccc.android.ui.mobile.util.copyToClipBoard
import com.oztechan.ccc.android.ui.mobile.util.dataState
import com.oztechan.ccc.android.ui.mobile.util.destroyBanner
import com.oztechan.ccc.android.ui.mobile.util.getFromClipBoard
import com.oztechan.ccc.android.ui.mobile.util.getNavigationResult
import com.oztechan.ccc.android.ui.mobile.util.setBackgroundByName
import com.oztechan.ccc.android.ui.mobile.util.setBannerAd
import com.oztechan.ccc.android.ui.mobile.util.showSnack
Expand Down Expand Up @@ -55,7 +54,6 @@ class CalculatorFragment : BaseVBFragment<FragmentCalculatorBinding>() {
binding.observeStates()
binding.setListeners()
observeEffects()
observeNavigationResults()
}

override fun onResume() {
Expand All @@ -76,14 +74,6 @@ class CalculatorFragment : BaseVBFragment<FragmentCalculatorBinding>() {
super.onDestroyView()
}

private fun observeNavigationResults() = getNavigationResult<String>(
CHANGE_BASE_EVENT,
R.id.calculatorFragment
)?.observe(viewLifecycleOwner) {
Logger.i { "CalculatorFragment observeNavigationResults $it" }
viewModel.event.onBaseChange(it)
}

private fun FragmentCalculatorBinding.initViews() {
adViewContainer.setBannerAd(
adManager = adManager,
Expand Down Expand Up @@ -205,8 +195,4 @@ class CalculatorFragment : BaseVBFragment<FragmentCalculatorBinding>() {
private fun Button.setKeyboardListener() = setOnClickListener {
viewModel.event.onKeyPress(text.toString())
}

companion object {
const val CHANGE_BASE_EVENT = "change_base"
}
}

0 comments on commit 65a5572

Please sign in to comment.