|
|
|
@ -21,10 +21,8 @@ import androidx.compose.foundation.layout.Column
@@ -21,10 +21,8 @@ import androidx.compose.foundation.layout.Column
|
|
|
|
|
import androidx.compose.foundation.layout.WindowInsets |
|
|
|
|
import androidx.compose.foundation.layout.fillMaxWidth |
|
|
|
|
import androidx.compose.foundation.layout.padding |
|
|
|
|
import androidx.compose.foundation.layout.size |
|
|
|
|
import androidx.compose.foundation.layout.statusBars |
|
|
|
|
import androidx.compose.foundation.layout.statusBarsPadding |
|
|
|
|
import androidx.compose.foundation.shape.CircleShape |
|
|
|
|
import androidx.compose.material3.ExperimentalMaterial3Api |
|
|
|
|
import androidx.compose.material3.MaterialTheme |
|
|
|
|
import androidx.compose.material3.TopAppBarDefaults |
|
|
|
@ -73,7 +71,6 @@ import io.element.android.libraries.designsystem.theme.components.HorizontalDivi
@@ -73,7 +71,6 @@ import io.element.android.libraries.designsystem.theme.components.HorizontalDivi
|
|
|
|
|
import io.element.android.libraries.designsystem.theme.components.Icon |
|
|
|
|
import io.element.android.libraries.designsystem.theme.components.IconButton |
|
|
|
|
import io.element.android.libraries.designsystem.theme.components.MediumTopAppBar |
|
|
|
|
import io.element.android.libraries.designsystem.theme.components.Surface |
|
|
|
|
import io.element.android.libraries.designsystem.theme.components.Text |
|
|
|
|
import io.element.android.libraries.matrix.api.core.UserId |
|
|
|
|
import io.element.android.libraries.matrix.api.user.MatrixUser |
|
|
|
@ -295,7 +292,7 @@ private fun DefaultRoomListTopBar(
@@ -295,7 +292,7 @@ private fun DefaultRoomListTopBar(
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
|
private fun NavigationIcon( |
|
|
|
|
avatarData: AvatarData?, |
|
|
|
|
avatarData: AvatarData, |
|
|
|
|
showAvatarIndicator: Boolean, |
|
|
|
|
onClick: () -> Unit, |
|
|
|
|
) { |
|
|
|
@ -304,20 +301,10 @@ private fun NavigationIcon(
@@ -304,20 +301,10 @@ private fun NavigationIcon(
|
|
|
|
|
onClick = onClick, |
|
|
|
|
) { |
|
|
|
|
Box { |
|
|
|
|
if (avatarData != null) { |
|
|
|
|
Avatar( |
|
|
|
|
avatarData = avatarData, |
|
|
|
|
contentDescription = stringResource(CommonStrings.common_settings), |
|
|
|
|
) |
|
|
|
|
} else { |
|
|
|
|
// Placeholder avatar until the avatarData is available |
|
|
|
|
Surface( |
|
|
|
|
modifier = Modifier.size(AvatarSize.CurrentUserTopBar.dp), |
|
|
|
|
shape = CircleShape, |
|
|
|
|
color = ElementTheme.colors.iconSecondary, |
|
|
|
|
content = {} |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
if (showAvatarIndicator) { |
|
|
|
|
RedIndicatorAtom( |
|
|
|
|
modifier = Modifier.align(Alignment.TopEnd) |
|
|
|
|