mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-06 12:28:29 +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,25 +79,10 @@ struct HomeScreenRoomCell: View {
|
|||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
private var header: some View {
|
private var header: some View {
|
||||||
HStack(alignment: .top, spacing: 16) {
|
HStack(alignment: .top, spacing: 16) {
|
||||||
HStack(spacing: 4) {
|
|
||||||
Text(room.name)
|
Text(room.name)
|
||||||
.font(.compound.bodyLGSemibold)
|
.font(.compound.bodyLGSemibold)
|
||||||
.foregroundColor(.compound.textPrimary)
|
.foregroundColor(.compound.textPrimary)
|
||||||
.lineLimit(1)
|
.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)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
if let timestamp = room.timestamp {
|
if let timestamp = room.timestamp {
|
||||||
@@ -118,8 +103,23 @@ struct HomeScreenRoomCell: View {
|
|||||||
.hidden()
|
.hidden()
|
||||||
.environment(\.redactionReasons, []) // Always maintain consistent height
|
.environment(\.redactionReasons, []) // Always maintain consistent height
|
||||||
|
|
||||||
|
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
|
lastMessage
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:899b9e713623f1653ca25f5cb03af6aa9e50c92c38f38dbeba5168852f163252
|
oid sha256:fb5f3d945f3fdd9c57613c9c3110d285ebdc881e30d4fe72988d1ac4d5249ac4
|
||||||
size 96321
|
size 96301
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:8a898c4e79d167633d0e503a3554a6a10634a49b3e25eeffc221c3399424468f
|
oid sha256:c000bb9cb033c8258697cab9854acad257703bb0522ba793831e5177d6daeb98
|
||||||
size 97646
|
size 97622
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:e32a4b30150f9ea92243c0e4dc01c0643459f635348fcd9d8073e0b04d882584
|
oid sha256:46777589e3790e982b497eee806f2d68c7f50ee9dcb9fc08e3aef08eeae02471
|
||||||
size 81929
|
size 82974
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:7bb0e71201fad83310529b313a6a4e9cd44bdc712996e0c42c43f0314e534d6c
|
oid sha256:9f798d16e787c4053e1b8534c9c2bb381b4cb01338e26db07d3c46d9bb6b0897
|
||||||
size 85654
|
size 87668
|
||||||
|
|||||||
Reference in New Issue
Block a user