Browse Source

Swiftformat.

pull/113/head
Abhishek Banthia 3 years ago
parent
commit
93c36cd25c
  1. 3
      Clocker/ClockerUnitTests/StandardMenubarHandlerTests.swift
  2. 2
      Clocker/Overall App/DataStore.swift
  3. 2
      Clocker/Panel/ParentPanelController.swift
  4. 5
      Clocker/Preferences/Appearance/AppearanceViewController.swift
  5. 2
      Clocker/Preferences/General/PreferencesViewController.swift
  6. 2
      Clocker/Preferences/Menu Bar/MenubarTitleProvider.swift

3
Clocker/ClockerUnitTests/StandardMenubarHandlerTests.swift

@ -28,7 +28,8 @@ class StandardMenubarHandlerTests: XCTestCase {
private func saveObject(object: TimezoneData,
in store: DataStore,
at index: Int = -1) {
at index: Int = -1)
{
var defaults = store.timezones()
let encodedObject = NSKeyedArchiver.archivedData(withRootObject: object as Any)
index == -1 ? defaults.append(encodedObject) : defaults.insert(encodedObject, at: index)

2
Clocker/Overall App/DataStore.swift

@ -45,7 +45,7 @@ class DataStore: NSObject {
shouldDisplayDayInMenubar = shouldDisplay(.dayInMenubar)
shouldDisplayDateInMenubar = shouldDisplay(.dateInMenubar)
if (shouldDisplay(.sync)) {
if shouldDisplay(.sync) {
ubiquitousStore = NSUbiquitousKeyValueStore.default
NotificationCenter.default.addObserver(self,
selector: #selector(ubiquitousKeyValueStoreChanged),

2
Clocker/Panel/ParentPanelController.swift

@ -196,7 +196,7 @@ class ParentPanelController: NSWindowController {
name: NSNotification.Name.NSSystemTimeZoneDidChange,
object: nil)
if (DataStore.shared().shouldDisplay(.sync)) {
if DataStore.shared().shouldDisplay(.sync) {
NotificationCenter.default.addObserver(forName: NSUbiquitousKeyValueStore.didChangeExternallyNotification,
object: self,
queue: OperationQueue.main)

5
Clocker/Preferences/Appearance/AppearanceViewController.swift

@ -16,7 +16,7 @@ class AppearanceViewController: ParentViewController {
@IBOutlet var includePlaceNameControl: NSSegmentedControl!
@IBOutlet var appearanceTab: NSTabView!
@IBOutlet var appDisplayControl: NSSegmentedControl!
@IBOutlet weak var syncLabel: NSTextField!
@IBOutlet var syncLabel: NSTextField!
private var themeDidChangeNotification: NSObjectProtocol?
@ -359,10 +359,9 @@ class AppearanceViewController: ParentViewController {
previewPanelTableView.reloadData()
}
@IBAction func toggleSync(_ sender: Any) {
@IBAction func toggleSync(_: Any) {
print("Toggle Sync")
}
}
extension AppearanceViewController: NSTableViewDataSource, NSTableViewDelegate {

2
Clocker/Preferences/General/PreferencesViewController.swift

@ -93,7 +93,7 @@ class PreferencesViewController: ParentViewController {
name: NSNotification.Name.customLabelChanged,
object: nil)
if (DataStore.shared().shouldDisplay(.sync)) {
if DataStore.shared().shouldDisplay(.sync) {
NotificationCenter.default.addObserver(forName: NSUbiquitousKeyValueStore.didChangeExternallyNotification,
object: self,
queue: OperationQueue.main)

2
Clocker/Preferences/Menu Bar/MenubarTitleProvider.swift

@ -9,7 +9,7 @@ class MenubarTitleProvider: NSObject {
private let store: DataStore
init(with dataStore: DataStore) {
self.store = dataStore
store = dataStore
super.init()
}

Loading…
Cancel
Save