Adds click action to toolbar to open space settings
This commit is contained in:
parent
7a30c72828
commit
9c47c82da4
|
@ -297,11 +297,20 @@ class NewHomeDetailFragment @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
views.collapsingToolbar.debouncedClicks(::openSpaceSettings)
|
||||
views.toolbar.debouncedClicks(::openSpaceSettings)
|
||||
|
||||
views.avatar.debouncedClicks {
|
||||
navigator.openSettings(requireContext())
|
||||
}
|
||||
}
|
||||
|
||||
private fun openSpaceSettings() = withState(viewModel) { viewState ->
|
||||
viewState.selectedSpace?.let {
|
||||
sharedActionViewModel.post(HomeActivitySharedAction.ShowSpaceSettings(it.roomId))
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupBottomNavigationView() {
|
||||
views.bottomNavigationView.menu.findItem(R.id.bottom_action_notification).isVisible = vectorPreferences.labAddNotificationTab()
|
||||
views.bottomNavigationView.setOnItemSelectedListener {
|
||||
|
|
Loading…
Reference in New Issue