From 13a13195fbc07fde53dad54889485327d1cab571 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Mon, 19 Jul 2021 11:29:04 -0400 Subject: [PATCH] Updating copy functionality! --- Clocker/Panel/ParentPanelController.swift | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Clocker/Panel/ParentPanelController.swift b/Clocker/Panel/ParentPanelController.swift index 73f90d1..c36fbdd 100644 --- a/Clocker/Panel/ParentPanelController.swift +++ b/Clocker/Panel/ParentPanelController.swift @@ -758,16 +758,12 @@ class ParentPanelController: NSWindowController { PerfLogger.endMarker("Retrieve Calendar Events") } } + + @IBAction func shareAction(_ sender: NSButton) { - let promotionText = "Keep track of your friends and colleagues in different timezones using Clocker: appstore.com/mac/clockermenubarworldclock" - - guard let url = URL(string: "https://goo.gl/xyLA4j") else { - assertionFailure("Data was unexpectedly nil") - return - } - - let servicePicker = NSSharingServicePicker(items: [promotionText, url]) + let copyAllTimes = retrieveAllTimes() + let servicePicker = NSSharingServicePicker(items: [copyAllTimes]) servicePicker.delegate = self servicePicker.show(relativeTo: sender.bounds,