mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Move the room list sending state icons to the front of the latest event.
This commit is contained in:
committed by
Stefan Ceriu
parent
4ea1aaecdd
commit
8518e67426
@@ -79,26 +79,11 @@ struct HomeScreenRoomCell: View {
|
||||
@ViewBuilder
|
||||
private var header: some View {
|
||||
HStack(alignment: .top, spacing: 16) {
|
||||
HStack(spacing: 4) {
|
||||
Text(room.name)
|
||||
.font(.compound.bodyLGSemibold)
|
||||
.foregroundColor(.compound.textPrimary)
|
||||
.lineLimit(1)
|
||||
|
||||
switch room.lastMessageState {
|
||||
case .sending:
|
||||
CompoundIcon(\.time, size: .xSmall, relativeTo: .compound.bodyLGSemibold)
|
||||
.foregroundStyle(.compound.iconTertiary)
|
||||
.accessibilityLabel(L10n.commonSending)
|
||||
case .failed:
|
||||
CompoundIcon(\.errorSolid, size: .xSmall, relativeTo: .compound.bodyLGSemibold)
|
||||
.foregroundStyle(.compound.iconCriticalPrimary)
|
||||
.accessibilityHidden(true) // The last message contains the error.
|
||||
case .none:
|
||||
EmptyView()
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
Text(room.name)
|
||||
.font(.compound.bodyLGSemibold)
|
||||
.foregroundColor(.compound.textPrimary)
|
||||
.lineLimit(1)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
if let timestamp = room.timestamp {
|
||||
Text(timestamp)
|
||||
@@ -118,7 +103,22 @@ struct HomeScreenRoomCell: View {
|
||||
.hidden()
|
||||
.environment(\.redactionReasons, []) // Always maintain consistent height
|
||||
|
||||
lastMessage
|
||||
HStack(alignment: .top, spacing: 4.0) {
|
||||
switch room.lastMessageState {
|
||||
case .sending:
|
||||
CompoundIcon(\.time, size: .xSmall, relativeTo: .compound.bodyLGSemibold)
|
||||
.foregroundStyle(.compound.iconTertiary)
|
||||
.accessibilityLabel(L10n.commonSending)
|
||||
case .failed:
|
||||
CompoundIcon(\.errorSolid, size: .xSmall, relativeTo: .compound.bodyLGSemibold)
|
||||
.foregroundStyle(.compound.iconCriticalPrimary)
|
||||
.accessibilityHidden(true) // The last message contains the error.
|
||||
case .none:
|
||||
EmptyView()
|
||||
}
|
||||
|
||||
lastMessage
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
Reference in New Issue
Block a user