Rework Modifier.applyIf.

It was using `Modifier.composed` which is not good for performance and detekt is warning about this.
This commit is contained in:
Benoit Marty 2024-04-03 11:34:49 +02:00 committed by Benoit Marty
parent 12b51e381e
commit 000bcb448c
2 changed files with 21 additions and 22 deletions

View file

@ -87,10 +87,13 @@ internal fun RoomListSearchView(
) {
Column(
modifier = modifier
.applyIf(state.isSearchActive, ifTrue = {
// Disable input interaction to underlying views
pointerInput(Unit) {}
})
.applyIf(
condition = state.isSearchActive,
ifTrue = {
// Disable input interaction to underlying views
pointerInput(Unit) {}
}
)
) {
if (state.isSearchActive) {
RoomListSearchContent(