mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +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()
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:899b9e713623f1653ca25f5cb03af6aa9e50c92c38f38dbeba5168852f163252
|
||||
size 96321
|
||||
oid sha256:fb5f3d945f3fdd9c57613c9c3110d285ebdc881e30d4fe72988d1ac4d5249ac4
|
||||
size 96301
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8a898c4e79d167633d0e503a3554a6a10634a49b3e25eeffc221c3399424468f
|
||||
size 97646
|
||||
oid sha256:c000bb9cb033c8258697cab9854acad257703bb0522ba793831e5177d6daeb98
|
||||
size 97622
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e32a4b30150f9ea92243c0e4dc01c0643459f635348fcd9d8073e0b04d882584
|
||||
size 81929
|
||||
oid sha256:46777589e3790e982b497eee806f2d68c7f50ee9dcb9fc08e3aef08eeae02471
|
||||
size 82974
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7bb0e71201fad83310529b313a6a4e9cd44bdc712996e0c42c43f0314e534d6c
|
||||
size 85654
|
||||
oid sha256:9f798d16e787c4053e1b8534c9c2bb381b4cb01338e26db07d3c46d9bb6b0897
|
||||
size 87668
|
||||
|
||||
Reference in New Issue
Block a user