Compare commits

...

2 Commits

Author SHA1 Message Date
d85921e9fe patch msg display 2025-12-13 03:07:06 +03:00
4d890a54a5 add navigation tab 2025-12-13 02:43:08 +03:00
3 changed files with 91 additions and 57 deletions

View File

@ -963,6 +963,7 @@
"comment" : "Contacts empty state title" "comment" : "Contacts empty state title"
}, },
"Контакты" : { "Контакты" : {
"comment" : "Contacts tab title",
"localizations" : { "localizations" : {
"en" : { "en" : {
"stringUnit" : { "stringUnit" : {

View File

@ -1044,6 +1044,7 @@ private struct ChatRowView: View {
} }
VStack(alignment: .leading, spacing: 4) { VStack(alignment: .leading, spacing: 4) {
HStack{
if let officialName = officialDisplayName { if let officialName = officialDisplayName {
HStack(spacing: 6) { HStack(spacing: 6) {
if #available(iOS 16.0, *) { if #available(iOS 16.0, *) {
@ -1082,18 +1083,8 @@ private struct ChatRowView: View {
} }
} }
Text(messagePreview)
.font(.subheadline)
.foregroundColor(subtitleColor)
.lineLimit(messageLimitLine)
.truncationMode(.tail)
}
.frame(maxWidth: .infinity, alignment: .leading)
Spacer()
VStack(alignment: .trailing, spacing: 6) {
if let timestamp { if let timestamp {
Spacer()
HStack(spacing: 4) { HStack(spacing: 4) {
if shouldShowReadStatus { if shouldShowReadStatus {
Image(systemName: readStatusIconName) Image(systemName: readStatusIconName)
@ -1107,7 +1098,17 @@ private struct ChatRowView: View {
} }
} }
}
HStack {
Text(messagePreview)
.font(.subheadline)
.foregroundColor(subtitleColor)
.lineLimit(messageLimitLine)
.truncationMode(.tail)
if chat.unreadCount > 0 { if chat.unreadCount > 0 {
Spacer()
Text("\(chat.unreadCount)") Text("\(chat.unreadCount)")
.font(.caption2.bold()) .font(.caption2.bold())
.foregroundColor(.white) .foregroundColor(.white)
@ -1119,6 +1120,37 @@ private struct ChatRowView: View {
} }
} }
} }
.frame(maxWidth: .infinity, alignment: .leading)
// Spacer()
// VStack(alignment: .trailing, spacing: 6) {
//// if let timestamp {
//// HStack(spacing: 4) {
//// if shouldShowReadStatus {
//// Image(systemName: readStatusIconName)
//// .foregroundColor(readStatusColor)
//// .font(.caption2)
//// }
////
//// Text(timestamp)
//// .font(.caption)
//// .foregroundColor(.secondary)
//// }
//// }
//
// if chat.unreadCount > 0 {
// Text("\(chat.unreadCount)")
// .font(.caption2.bold())
// .foregroundColor(.white)
// .padding(.horizontal, 8)
// .padding(.vertical, 4)
// .background(
// Capsule().fill(Color.accentColor)
// )
// }
// }
}
.padding(.vertical, 8) .padding(.vertical, 8)
} }

View File

@ -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 {