Compare commits
2 Commits
7dc4882f27
...
d85921e9fe
| Author | SHA1 | Date | |
|---|---|---|---|
| d85921e9fe | |||
| 4d890a54a5 |
@ -963,6 +963,7 @@
|
|||||||
"comment" : "Contacts empty state title"
|
"comment" : "Contacts empty state title"
|
||||||
},
|
},
|
||||||
"Контакты" : {
|
"Контакты" : {
|
||||||
|
"comment" : "Contacts tab title",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
|
|||||||
@ -1044,80 +1044,112 @@ private struct ChatRowView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
VStack(alignment: .leading, spacing: 4) {
|
VStack(alignment: .leading, spacing: 4) {
|
||||||
if let officialName = officialDisplayName {
|
HStack{
|
||||||
HStack(spacing: 6) {
|
if let officialName = officialDisplayName {
|
||||||
|
HStack(spacing: 6) {
|
||||||
|
if #available(iOS 16.0, *) {
|
||||||
|
Text(officialName)
|
||||||
|
.fontWeight(.semibold)
|
||||||
|
.foregroundColor(.primary)
|
||||||
|
.lineLimit(1)
|
||||||
|
.truncationMode(.tail)
|
||||||
|
.strikethrough(isDeletedUser, color: Color.secondary)
|
||||||
|
} else {
|
||||||
|
Text(officialName)
|
||||||
|
.fontWeight(.semibold)
|
||||||
|
.foregroundColor(.primary)
|
||||||
|
.lineLimit(1)
|
||||||
|
.truncationMode(.tail)
|
||||||
|
}
|
||||||
|
|
||||||
|
Image(systemName: "checkmark.seal.fill")
|
||||||
|
.foregroundColor(Color.accentColor)
|
||||||
|
.font(.caption)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if #available(iOS 16.0, *) {
|
if #available(iOS 16.0, *) {
|
||||||
Text(officialName)
|
Text(title)
|
||||||
.fontWeight(.semibold)
|
.fontWeight(chat.unreadCount > 0 ? .semibold : .regular)
|
||||||
.foregroundColor(.primary)
|
.foregroundColor(.primary)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
.truncationMode(.tail)
|
.truncationMode(.tail)
|
||||||
.strikethrough(isDeletedUser, color: Color.secondary)
|
.strikethrough(isDeletedUser, color: Color.secondary)
|
||||||
} else {
|
} else {
|
||||||
Text(officialName)
|
Text(title)
|
||||||
.fontWeight(.semibold)
|
.fontWeight(chat.unreadCount > 0 ? .semibold : .regular)
|
||||||
.foregroundColor(.primary)
|
.foregroundColor(.primary)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
.truncationMode(.tail)
|
.truncationMode(.tail)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Image(systemName: "checkmark.seal.fill")
|
if let timestamp {
|
||||||
.foregroundColor(Color.accentColor)
|
Spacer()
|
||||||
.font(.caption)
|
HStack(spacing: 4) {
|
||||||
}
|
if shouldShowReadStatus {
|
||||||
} else {
|
Image(systemName: readStatusIconName)
|
||||||
if #available(iOS 16.0, *) {
|
.foregroundColor(readStatusColor)
|
||||||
Text(title)
|
.font(.caption2)
|
||||||
.fontWeight(chat.unreadCount > 0 ? .semibold : .regular)
|
}
|
||||||
.foregroundColor(.primary)
|
|
||||||
.lineLimit(1)
|
Text(timestamp)
|
||||||
.truncationMode(.tail)
|
.font(.caption)
|
||||||
.strikethrough(isDeletedUser, color: Color.secondary)
|
.foregroundColor(.secondary)
|
||||||
} else {
|
}
|
||||||
Text(title)
|
|
||||||
.fontWeight(chat.unreadCount > 0 ? .semibold : .regular)
|
|
||||||
.foregroundColor(.primary)
|
|
||||||
.lineLimit(1)
|
|
||||||
.truncationMode(.tail)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Text(messagePreview)
|
HStack {
|
||||||
.font(.subheadline)
|
Text(messagePreview)
|
||||||
.foregroundColor(subtitleColor)
|
.font(.subheadline)
|
||||||
.lineLimit(messageLimitLine)
|
.foregroundColor(subtitleColor)
|
||||||
.truncationMode(.tail)
|
.lineLimit(messageLimitLine)
|
||||||
|
.truncationMode(.tail)
|
||||||
|
|
||||||
|
if chat.unreadCount > 0 {
|
||||||
|
Spacer()
|
||||||
|
Text("\(chat.unreadCount)")
|
||||||
|
.font(.caption2.bold())
|
||||||
|
.foregroundColor(.white)
|
||||||
|
.padding(.horizontal, 8)
|
||||||
|
.padding(.vertical, 4)
|
||||||
|
.background(
|
||||||
|
Capsule().fill(Color.accentColor)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
Spacer()
|
// Spacer()
|
||||||
|
|
||||||
VStack(alignment: .trailing, spacing: 6) {
|
// VStack(alignment: .trailing, spacing: 6) {
|
||||||
if let timestamp {
|
//// if let timestamp {
|
||||||
HStack(spacing: 4) {
|
//// HStack(spacing: 4) {
|
||||||
if shouldShowReadStatus {
|
//// if shouldShowReadStatus {
|
||||||
Image(systemName: readStatusIconName)
|
//// Image(systemName: readStatusIconName)
|
||||||
.foregroundColor(readStatusColor)
|
//// .foregroundColor(readStatusColor)
|
||||||
.font(.caption2)
|
//// .font(.caption2)
|
||||||
}
|
//// }
|
||||||
|
////
|
||||||
Text(timestamp)
|
//// Text(timestamp)
|
||||||
.font(.caption)
|
//// .font(.caption)
|
||||||
.foregroundColor(.secondary)
|
//// .foregroundColor(.secondary)
|
||||||
}
|
//// }
|
||||||
}
|
//// }
|
||||||
|
//
|
||||||
if chat.unreadCount > 0 {
|
// if chat.unreadCount > 0 {
|
||||||
Text("\(chat.unreadCount)")
|
// Text("\(chat.unreadCount)")
|
||||||
.font(.caption2.bold())
|
// .font(.caption2.bold())
|
||||||
.foregroundColor(.white)
|
// .foregroundColor(.white)
|
||||||
.padding(.horizontal, 8)
|
// .padding(.horizontal, 8)
|
||||||
.padding(.vertical, 4)
|
// .padding(.vertical, 4)
|
||||||
.background(
|
// .background(
|
||||||
Capsule().fill(Color.accentColor)
|
// Capsule().fill(Color.accentColor)
|
||||||
)
|
// )
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
.padding(.vertical, 8)
|
.padding(.vertical, 8)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,6 +81,7 @@ struct ContactsTab: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.navigationTitle(NSLocalizedString("Контакты", comment: "Contacts tab title"))
|
||||||
.background(Color(UIColor.systemBackground))
|
.background(Color(UIColor.systemBackground))
|
||||||
.listStyle(.plain)
|
.listStyle(.plain)
|
||||||
.task {
|
.task {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user