mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 02:15:35 +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 {
|
views.avatar.debouncedClicks {
|
||||||
navigator.openSettings(requireContext())
|
navigator.openSettings(requireContext())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun openSpaceSettings() = withState(viewModel) { viewState ->
|
||||||
|
viewState.selectedSpace?.let {
|
||||||
|
sharedActionViewModel.post(HomeActivitySharedAction.ShowSpaceSettings(it.roomId))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun setupBottomNavigationView() {
|
private fun setupBottomNavigationView() {
|
||||||
views.bottomNavigationView.menu.findItem(R.id.bottom_action_notification).isVisible = vectorPreferences.labAddNotificationTab()
|
views.bottomNavigationView.menu.findItem(R.id.bottom_action_notification).isVisible = vectorPreferences.labAddNotificationTab()
|
||||||
views.bottomNavigationView.setOnItemSelectedListener {
|
views.bottomNavigationView.setOnItemSelectedListener {
|
||||||
|
|
Loading…
Reference in a new issue