Skip to content

Commit

Permalink
#212 Add dining container click listener
Browse files Browse the repository at this point in the history
  • Loading branch information
wateralsie committed Apr 16, 2024
1 parent 9ee2a27 commit f693a32
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import `in`.koreatech.koin.domain.model.dining.Dining
import `in`.koreatech.koin.domain.util.DiningUtil
import `in`.koreatech.koin.domain.util.ext.arrange
import `in`.koreatech.koin.domain.util.ext.typeFilter
import `in`.koreatech.koin.ui.main.activity.MainActivity
import `in`.koreatech.koin.ui.main.viewmodel.MainActivityViewModel
import `in`.koreatech.koin.util.ext.observeLiveData

Expand All @@ -31,8 +32,13 @@ class DiningContainerFragment : Fragment(R.layout.fragment_dining_container) {
initViewModel()
}

private fun initView() {

private fun initView() = with(binding) {
diningContainer.setOnClickListener {
if (activity is MainActivity) {
val mainActivity = activity as MainActivity
mainActivity.callDrawerItem(R.id.navi_item_dining)
}
}
}

private fun initViewModel() = with(viewModel) {
Expand Down

0 comments on commit f693a32

Please sign in to comment.