Skip to content
Snippets Groups Projects
Commit c1952b00 authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Add contact ID to MyContactView

parent 13bc70ac
No related branches found
No related tags found
2 merge requests!112Restore contacts from backup,!102Release 1.0.0
import AppCore
import ComposableArchitecture
import SwiftUI
import XXModels
......@@ -49,8 +50,17 @@ public struct MyContactView: View {
public var body: some View {
WithViewStore(store, observe: ViewState.init) { viewStore in
Form {
Section {
Text(viewStore.contact?.id.hexString ?? "")
.font(.footnote.monospaced())
.textSelection(.enabled)
} header: {
Label("ID", systemImage: "number")
}
Section {
Text(viewStore.contact?.username ?? "")
.textSelection(.enabled)
} header: {
Label("Username", systemImage: "person")
}
......@@ -59,6 +69,7 @@ public struct MyContactView: View {
if let contact = viewStore.contact {
if let email = contact.email {
Text(email)
.textSelection(.enabled)
Button(role: .destructive) {
viewStore.send(.unregisterEmailTapped)
} label: {
......@@ -135,6 +146,7 @@ public struct MyContactView: View {
if let contact = viewStore.contact {
if let phone = contact.phone {
Text(phone)
.textSelection(.enabled)
Button(role: .destructive) {
viewStore.send(.unregisterPhoneTapped)
} label: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment