From b4359e34bc59e974a9e1db147d567312fc3a7f67 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Tue, 6 Jul 2021 16:23:16 -0400 Subject: [PATCH 1/2] Use follow intent for twitter link! --- Clocker/Onboarding/FinalOnboardingViewController.swift | 2 +- Clocker/Preferences/About/AboutViewController.swift | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Clocker/Onboarding/FinalOnboardingViewController.swift b/Clocker/Onboarding/FinalOnboardingViewController.swift index 42ef30a5..6f652265 100644 --- a/Clocker/Onboarding/FinalOnboardingViewController.swift +++ b/Clocker/Onboarding/FinalOnboardingViewController.swift @@ -70,7 +70,7 @@ class FinalOnboardingViewController: NSViewController { } @IBAction func localizationAction(_: Any) { - guard let localizationURL = URL(string: AboutUsConstants.TwitterLink), + guard let localizationURL = URL(string: AboutUsConstants.TwitterFollowIntentLink), let languageCode = Locale.preferredLanguages.first else { return } NSWorkspace.shared.open(localizationURL) diff --git a/Clocker/Preferences/About/AboutViewController.swift b/Clocker/Preferences/About/AboutViewController.swift index a06a6b5b..f7de491e 100644 --- a/Clocker/Preferences/About/AboutViewController.swift +++ b/Clocker/Preferences/About/AboutViewController.swift @@ -8,6 +8,7 @@ struct AboutUsConstants { static let GitHubURL = "https://github.com/abhishekbanthia/Clocker/?ref=ClockerApp" static let PayPalURL = "https://paypal.me/abhishekbanthia1712" static let TwitterLink = "https://twitter.com/clocker_support/?ref=ClockerApp" + static let TwitterFollowIntentLink = "https://twitter.com/intent/follow?screen_name=clocker_support" static let AppStoreLink = "macappstore://itunes.apple.com/us/app/clocker/id1056643111?action=write-review" static let CrowdInLocalizationLink = "https://crwd.in/clocker" } From c48ef18e99df0174fa970818677f87b4eb2eb5cf Mon Sep 17 00:00:00 2001 From: Abhishek Date: Tue, 6 Jul 2021 17:12:08 -0400 Subject: [PATCH 2/2] Fix Zoom unintentionally opening issue. --- Clocker/Panel/ParentPanelController.swift | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Clocker/Panel/ParentPanelController.swift b/Clocker/Panel/ParentPanelController.swift index 35bdc560..a740312d 100644 --- a/Clocker/Panel/ParentPanelController.swift +++ b/Clocker/Panel/ParentPanelController.swift @@ -696,19 +696,19 @@ class ParentPanelController: NSWindowController { } @IBAction func dismissNextEventLabel(_: NSButton) { + let eventCenter = EventCenter.sharedCenter() + let now = Date() + if let events = eventCenter.eventsForDate[NSCalendar.autoupdatingCurrent.startOfDay(for: now)], events.isEmpty == false { + if let upcomingEvent = eventCenter.nextOccuring(events), let meetingLink = upcomingEvent.meetingURL { + NSWorkspace.shared.open(meetingLink) + } + } else { removeUpcomingEventView() + } } func removeUpcomingEventView() { OperationQueue.main.addOperation { - let eventCenter = EventCenter.sharedCenter() - let now = Date() - if let events = eventCenter.eventsForDate[NSCalendar.autoupdatingCurrent.startOfDay(for: now)], events.isEmpty == false { - if let upcomingEvent = eventCenter.nextOccuring(events), let meetingLink = upcomingEvent.meetingURL { - NSWorkspace.shared.open(meetingLink) - } - } - if self.stackView.arrangedSubviews.contains(self.upcomingEventView!), self.upcomingEventView?.isHidden == false { self.upcomingEventView?.isHidden = true UserDefaults.standard.set("NO", forKey: CLShowUpcomingEventView)