Merge pull request #7785 from vector-im/fix/mna/hide-filter-in-selection-mode
[Session manager] Other sessions list: filter option is displayed when selection mode is enabled (PSG-1113)
This commit is contained in:
commit
ef7b5a4418
1
changelog.d/7784.bugfix
Normal file
1
changelog.d/7784.bugfix
Normal file
@ -0,0 +1 @@
|
||||
[Session manager] Other sessions list: filter option is displayed when selection mode is enabled
|
@ -225,6 +225,7 @@ class OtherSessionsFragment :
|
||||
|
||||
override fun invalidate() = withState(viewModel) { state ->
|
||||
updateLoading(state.isLoading)
|
||||
updateFilterView(state.isSelectModeEnabled)
|
||||
if (state.devices is Success) {
|
||||
val devices = state.devices.invoke()
|
||||
renderDevices(devices, state.currentFilter, state.isShowingIpAddress)
|
||||
@ -240,6 +241,10 @@ class OtherSessionsFragment :
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateFilterView(isSelectModeEnabled: Boolean) {
|
||||
views.otherSessionsFilterFrameLayout.isVisible = isSelectModeEnabled.not()
|
||||
}
|
||||
|
||||
private fun updateToolbar(devices: List<DeviceFullInfo>, isSelectModeEnabled: Boolean) {
|
||||
invalidateOptionsMenu()
|
||||
val title = if (isSelectModeEnabled) {
|
||||
|
Loading…
Reference in New Issue
Block a user