Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
n0shake committed Jul 7, 2021
2 parents 3b453de + c48ef18 commit f219894
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Clocker/Onboarding/FinalOnboardingViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ class FinalOnboardingViewController: NSViewController {
}

@IBAction func localizationAction(_: Any) {
guard let localizationURL = URL(string: AboutUsConstants.TwitterLink),
let languageCode = Locale.preferredLanguages.first else { return }
guard let localizationURL = URL(string: AboutUsConstants.TwitterFollowIntentLink),
let languageCode = Locale.preferredLanguages.first else { return }

NSWorkspace.shared.open(localizationURL)

Expand Down
16 changes: 8 additions & 8 deletions Clocker/Panel/ParentPanelController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -700,19 +700,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)
Expand Down
1 change: 1 addition & 0 deletions Clocker/Preferences/About/AboutViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit f219894

Please sign in to comment.