mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-25 10:55:55 +03:00
Merge pull request #6868 from vector-im/feature/eric/space-settings
Space Switching: Adds Toolbar Click To Open Space Settings
This commit is contained in:
commit
2830664dbb
2 changed files with 10 additions and 0 deletions
1
changelog.d/6859.wip
Normal file
1
changelog.d/6859.wip
Normal file
|
@ -0,0 +1 @@
|
|||
[New Layout] Adds space settings accessible through clicking the toolbar
|
|
@ -291,11 +291,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 a new issue