mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Hiding the buttons when the search is active
This commit is contained in:
committed by
Florian Renaud
parent
e6c7afd614
commit
a7d46513af
+24
-23
@@ -19,7 +19,6 @@ package io.element.android.features.createroom.root
|
|||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.SearchBarDefaults
|
import androidx.compose.material3.SearchBarDefaults
|
||||||
import androidx.compose.material3.TextButton
|
import androidx.compose.material3.TextButton
|
||||||
@@ -76,29 +75,31 @@ fun CreateRoomRootScreen(
|
|||||||
active = isSearchActive,
|
active = isSearchActive,
|
||||||
)
|
)
|
||||||
|
|
||||||
TextButton(
|
if (!isSearchActive.value) {
|
||||||
modifier = Modifier.padding(start = 8.dp, top = 16.dp, end = 8.dp),
|
TextButton(
|
||||||
onClick = { }) {
|
modifier = Modifier.padding(start = 8.dp, top = 16.dp, end = 8.dp),
|
||||||
Icon(
|
onClick = { }) {
|
||||||
modifier = Modifier
|
Icon(
|
||||||
.padding(end = 16.dp),
|
modifier = Modifier
|
||||||
resourceId = DrawableR.drawable.ic_group, // TODO ask design for squared icon
|
.padding(end = 16.dp),
|
||||||
contentDescription = ""
|
resourceId = DrawableR.drawable.ic_group, // TODO ask design for squared icon
|
||||||
)
|
contentDescription = ""
|
||||||
Text(text = stringResource(id = StringR.string.new_room))
|
)
|
||||||
}
|
Text(text = stringResource(id = StringR.string.new_room))
|
||||||
|
}
|
||||||
|
|
||||||
TextButton(
|
TextButton(
|
||||||
modifier = Modifier.padding(horizontal = 8.dp),
|
modifier = Modifier.padding(horizontal = 8.dp),
|
||||||
onClick = { }
|
onClick = { }
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(end = 16.dp),
|
.padding(end = 16.dp),
|
||||||
resourceId = DrawableR.drawable.ic_share,
|
resourceId = DrawableR.drawable.ic_share,
|
||||||
contentDescription = ""
|
contentDescription = ""
|
||||||
)
|
)
|
||||||
Text(text = stringResource(id = StringR.string.invite_people_menu))
|
Text(text = stringResource(id = StringR.string.invite_people_menu))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user