mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-24 21:45:38 +00:00
contact sub status
This commit is contained in:
@@ -56,6 +56,11 @@ struct ChatInfoToolbar: View {
|
||||
.padding(.top, -2)
|
||||
}
|
||||
}
|
||||
if let contact = chat.chatInfo.contact,
|
||||
contact.ready && contact.active,
|
||||
let chatSubStatus = ChatModel.shared.chatSubStatus {
|
||||
SubStatusServerImage(status: chatSubStatus)
|
||||
}
|
||||
}
|
||||
.foregroundColor(theme.colors.onBackground)
|
||||
.frame(width: 220)
|
||||
|
||||
@@ -556,16 +556,10 @@ struct ChatInfoView: View {
|
||||
Spacer()
|
||||
Text(status.statusString)
|
||||
.foregroundColor(theme.colors.secondary)
|
||||
serverImage(status)
|
||||
SubStatusServerImage(status: status)
|
||||
}
|
||||
}
|
||||
|
||||
private func serverImage(_ status: SubscriptionStatus) -> some View {
|
||||
return Image(systemName: status.imageName)
|
||||
.foregroundColor(status == .active ? .green : theme.colors.secondary)
|
||||
.font(.system(size: 12))
|
||||
}
|
||||
|
||||
private func deleteContactButton() -> some View {
|
||||
Button(role: .destructive) {
|
||||
deleteContactDialog(
|
||||
@@ -667,6 +661,17 @@ struct ChatInfoView: View {
|
||||
}
|
||||
}
|
||||
|
||||
struct SubStatusServerImage: View {
|
||||
@EnvironmentObject var theme: AppTheme
|
||||
var status: SubscriptionStatus
|
||||
|
||||
var body: some View {
|
||||
Image(systemName: status.imageName)
|
||||
.foregroundColor(status == .active ? .green : theme.colors.secondary)
|
||||
.font(.system(size: 12))
|
||||
}
|
||||
}
|
||||
|
||||
struct ChatTTLOption: View {
|
||||
@ObservedObject var chat: Chat
|
||||
@Binding var progressIndicator: Bool
|
||||
|
||||
Reference in New Issue
Block a user