From 2fa4b9ce6ebda53bf99a15aaee7935a4bafed288 Mon Sep 17 00:00:00 2001 From: Anya Mallon Date: Wed, 31 Jan 2024 14:06:58 +0100 Subject: [PATCH 1/2] Make notes text copyable --- .../PasswordManagementLoginItemView.swift | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/DuckDuckGo/SecureVault/View/PasswordManagementLoginItemView.swift b/DuckDuckGo/SecureVault/View/PasswordManagementLoginItemView.swift index 1352b5f510..ce8512f0d0 100644 --- a/DuckDuckGo/SecureVault/View/PasswordManagementLoginItemView.swift +++ b/DuckDuckGo/SecureVault/View/PasswordManagementLoginItemView.swift @@ -507,11 +507,30 @@ private struct NotesView: View { model.copy(model.notes) }) })) + .modifier(TextSelectionModifier()) } } } +private struct TextSelectionModifier: ViewModifier { + + func body(content: Content) -> some View { +#if APPSTORE + content + .textSelection(.enabled) +#else + if #available(macOS 12, *) { + content + .textSelection(.enabled) + } else { + content + } +#endif + } + +} + private struct DatesView: View { @EnvironmentObject var model: PasswordManagementLoginModel From 640385cf2eff14d6d409b8b22df7e5cc3f8759cc Mon Sep 17 00:00:00 2001 From: Anya Mallon Date: Sat, 17 Feb 2024 14:52:14 +0100 Subject: [PATCH 2/2] removed unnecessary if APPSTORE check --- .../SecureVault/View/PasswordManagementLoginItemView.swift | 5 ----- 1 file changed, 5 deletions(-) diff --git a/DuckDuckGo/SecureVault/View/PasswordManagementLoginItemView.swift b/DuckDuckGo/SecureVault/View/PasswordManagementLoginItemView.swift index 2a52a36ed4..b351d5e210 100644 --- a/DuckDuckGo/SecureVault/View/PasswordManagementLoginItemView.swift +++ b/DuckDuckGo/SecureVault/View/PasswordManagementLoginItemView.swift @@ -518,17 +518,12 @@ private struct NotesView: View { private struct TextSelectionModifier: ViewModifier { func body(content: Content) -> some View { -#if APPSTORE - content - .textSelection(.enabled) -#else if #available(macOS 12, *) { content .textSelection(.enabled) } else { content } -#endif } }