Browse Source

Merge branch 'master' of https://github.com/n0shake/Clocker

pull/101/head 21.07.02
Abhishek Banthia 4 years ago
parent
commit
f21989442d
  1. 4
      Clocker/Onboarding/FinalOnboardingViewController.swift
  2. 16
      Clocker/Panel/ParentPanelController.swift
  3. 1
      Clocker/Preferences/About/AboutViewController.swift

4
Clocker/Onboarding/FinalOnboardingViewController.swift

@ -70,8 +70,8 @@ class FinalOnboardingViewController: NSViewController {
} }
@IBAction func localizationAction(_: Any) { @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 } let languageCode = Locale.preferredLanguages.first else { return }
NSWorkspace.shared.open(localizationURL) NSWorkspace.shared.open(localizationURL)

16
Clocker/Panel/ParentPanelController.swift

@ -700,19 +700,19 @@ class ParentPanelController: NSWindowController {
} }
@IBAction func dismissNextEventLabel(_: NSButton) { @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() removeUpcomingEventView()
}
} }
func removeUpcomingEventView() { func removeUpcomingEventView() {
OperationQueue.main.addOperation { 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 { if self.stackView.arrangedSubviews.contains(self.upcomingEventView!), self.upcomingEventView?.isHidden == false {
self.upcomingEventView?.isHidden = true self.upcomingEventView?.isHidden = true
UserDefaults.standard.set("NO", forKey: CLShowUpcomingEventView) UserDefaults.standard.set("NO", forKey: CLShowUpcomingEventView)

1
Clocker/Preferences/About/AboutViewController.swift

@ -8,6 +8,7 @@ struct AboutUsConstants {
static let GitHubURL = "https://github.com/abhishekbanthia/Clocker/?ref=ClockerApp" static let GitHubURL = "https://github.com/abhishekbanthia/Clocker/?ref=ClockerApp"
static let PayPalURL = "https://paypal.me/abhishekbanthia1712" static let PayPalURL = "https://paypal.me/abhishekbanthia1712"
static let TwitterLink = "https://twitter.com/clocker_support/?ref=ClockerApp" 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 AppStoreLink = "macappstore://itunes.apple.com/us/app/clocker/id1056643111?action=write-review"
static let CrowdInLocalizationLink = "https://crwd.in/clocker" static let CrowdInLocalizationLink = "https://crwd.in/clocker"
} }

Loading…
Cancel
Save