mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-12 13:05:15 +00:00
fixes
This commit is contained in:
@@ -37,9 +37,15 @@ struct ContactListNavLink: View {
|
||||
)
|
||||
} label: {
|
||||
HStack{
|
||||
ProfileImage(imageStr: contact.image, size: 38)
|
||||
.padding(.trailing, 2)
|
||||
ZStack(alignment: .bottomTrailing) {
|
||||
ProfileImage(imageStr: contact.image, size: 38)
|
||||
chatPreviewImageOverlayIcon(contact)
|
||||
.padding([.bottom, .trailing], 1)
|
||||
}
|
||||
.padding(.trailing, 2)
|
||||
|
||||
previewTitle(contact)
|
||||
|
||||
if contact.contactConnIncognito {
|
||||
Spacer()
|
||||
Image(systemName: "theatermasks")
|
||||
@@ -111,6 +117,21 @@ struct ContactListNavLink: View {
|
||||
.baselineOffset(1)
|
||||
.kerning(-2)
|
||||
}
|
||||
|
||||
@ViewBuilder private func chatPreviewImageOverlayIcon(_ contact: Contact) -> some View {
|
||||
if !contact.active {
|
||||
inactiveIcon()
|
||||
} else {
|
||||
EmptyView()
|
||||
}
|
||||
}
|
||||
|
||||
// TODO smaller
|
||||
private func inactiveIcon() -> some View {
|
||||
Image(systemName: "multiply.circle.fill")
|
||||
.foregroundColor(.secondary.opacity(0.65))
|
||||
.background(Circle().foregroundColor(Color(uiColor: .systemBackground)))
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
|
||||
@@ -79,7 +79,7 @@ struct ChatListNavLink: View {
|
||||
|
||||
@ViewBuilder private func contactNavLink(_ contact: Contact) -> some View {
|
||||
Group {
|
||||
if contact.activeConn == nil && contact.profile.contactLink != nil {
|
||||
if contact.activeConn == nil && contact.profile.contactLink != nil && contact.active {
|
||||
ChatPreviewView(chat: chat, progressByTimeout: Binding.constant(false))
|
||||
.frame(height: rowHeights[dynamicTypeSize])
|
||||
.swipeActions(edge: .trailing, allowsFullSwipe: true) {
|
||||
|
||||
Reference in New Issue
Block a user