mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Fixing visibility of the select session action when empty list
This commit is contained in:
parent
b7f9419bd4
commit
600f650256
@ -46,6 +46,7 @@ import im.vector.app.features.settings.devices.v2.list.OtherSessionsView
|
||||
import im.vector.app.features.settings.devices.v2.list.SESSION_IS_MARKED_AS_INACTIVE_AFTER_DAYS
|
||||
import im.vector.app.features.settings.devices.v2.more.SessionLearnMoreBottomSheet
|
||||
import im.vector.app.features.themes.ThemeUtils
|
||||
import org.matrix.android.sdk.api.extensions.orFalse
|
||||
import javax.inject.Inject
|
||||
|
||||
@AndroidEntryPoint
|
||||
@ -75,7 +76,7 @@ class OtherSessionsFragment :
|
||||
val isSelectModeEnabled = state.isSelectModeEnabled
|
||||
menu.findItem(R.id.otherSessionsSelectAll).isVisible = isSelectModeEnabled
|
||||
menu.findItem(R.id.otherSessionsDeselectAll).isVisible = isSelectModeEnabled
|
||||
menu.findItem(R.id.otherSessionsSelect).isVisible = !isSelectModeEnabled
|
||||
menu.findItem(R.id.otherSessionsSelect).isVisible = !isSelectModeEnabled && state.devices()?.isNotEmpty().orFalse()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user