Hiding the filter icon in top bar when in selection mode

This commit is contained in:
Maxime NATUREL 2022-12-15 11:02:59 +01:00
parent cf98963cdb
commit dcb8aea292

View file

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