Adds click action to toolbar to open space settings

This commit is contained in:
ericdecanini 2022-08-17 22:23:39 +02:00
parent 7a30c72828
commit 9c47c82da4

View File

@ -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 {