From 0a9b9f138723747742f495ff03afceee8b77f59b Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Fri, 25 Feb 2022 15:00:43 -0800 Subject: [PATCH] Add a snackbar message when an email address is copied --- .../Sources/App/Views/Profile/NewsletterEmailsView.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apple/OmnivoreKit/Sources/App/Views/Profile/NewsletterEmailsView.swift b/apple/OmnivoreKit/Sources/App/Views/Profile/NewsletterEmailsView.swift index 3c3752e70..4e930e4fa 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Profile/NewsletterEmailsView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Profile/NewsletterEmailsView.swift @@ -83,7 +83,10 @@ struct NewsletterEmailsView: View { Section(header: Text("Existing Emails (Tap to copy)")) { ForEach(viewModel.emails) { newsletterEmail in Button( - action: { UIPasteboard.general.string = newsletterEmail.email }, + action: { + UIPasteboard.general.string = newsletterEmail.email + NSNotification.operationSuccess(message: "Email copied") + }, label: { Text(newsletterEmail.email) } ) }