From 5e21f03e7aa1d2e302c90065202c82d04e4c45cf Mon Sep 17 00:00:00 2001 From: Greg Bolsinga Date: Fri, 27 Sep 2024 13:53:35 -0700 Subject: [PATCH 1/2] Remove ArchiveCategoryShareActivityModifier --- ...ArchiveCategoryShareActivityModifier.swift | 34 ------------------- .../Music/UI/CategoryDetailModifier.swift | 1 + 2 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 Sources/Site/Music/UI/ArchiveCategoryShareActivityModifier.swift diff --git a/Sources/Site/Music/UI/ArchiveCategoryShareActivityModifier.swift b/Sources/Site/Music/UI/ArchiveCategoryShareActivityModifier.swift deleted file mode 100644 index 45183861..00000000 --- a/Sources/Site/Music/UI/ArchiveCategoryShareActivityModifier.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// ArchiveCategoryShareActivityModifier.swift -// -// -// Created by Greg Bolsinga on 8/3/24. -// - -import SwiftUI -import os - -extension Logger { - fileprivate static let sharing = Logger(category: "sharing") -} - -struct ArchiveCategoryShareActivityModifier: ViewModifier { - let category: ArchiveCategory - let vault: Vault - - func body(content: Content) -> some View { - let url = vault.categoryURLMap[category] - Logger.sharing.log( - "\(category.rawValue, privacy: .public), url: \(url?.absoluteString ?? "nil", privacy: .public)" - ) - return - content - .archiveShare(category, url: url) - } -} - -extension View { - func shareActivity(for category: ArchiveCategory, vault: Vault) -> some View { - modifier(ArchiveCategoryShareActivityModifier(category: category, vault: vault)) - } -} diff --git a/Sources/Site/Music/UI/CategoryDetailModifier.swift b/Sources/Site/Music/UI/CategoryDetailModifier.swift index 08ca583b..7b343407 100644 --- a/Sources/Site/Music/UI/CategoryDetailModifier.swift +++ b/Sources/Site/Music/UI/CategoryDetailModifier.swift @@ -16,6 +16,7 @@ struct CategoryDetailModifier: ViewModifier { func body(content: Content) -> some View { NavigationStack(path: $path) { content + .archiveShare(category, url: vault.categoryURLMap[category]) .shareActivity(for: category, vault: vault) .musicDestinations(vault, path: path) #if !os(macOS) From 1280c7c21d2e007dd55a0a1f6f9917a12f604d4d Mon Sep 17 00:00:00 2001 From: Greg Bolsinga Date: Fri, 27 Sep 2024 13:54:28 -0700 Subject: [PATCH 2/2] bad edit --- Sources/Site/Music/UI/CategoryDetailModifier.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Sources/Site/Music/UI/CategoryDetailModifier.swift b/Sources/Site/Music/UI/CategoryDetailModifier.swift index 7b343407..0bb77a18 100644 --- a/Sources/Site/Music/UI/CategoryDetailModifier.swift +++ b/Sources/Site/Music/UI/CategoryDetailModifier.swift @@ -17,7 +17,6 @@ struct CategoryDetailModifier: ViewModifier { NavigationStack(path: $path) { content .archiveShare(category, url: vault.categoryURLMap[category]) - .shareActivity(for: category, vault: vault) .musicDestinations(vault, path: path) #if !os(macOS) .nearbyDistanceThreshold(nearbyModel)