autoformatted

This commit is contained in:
Michael Kirk 2019-03-30 07:24:40 -06:00
parent 64a0c4bfaa
commit 30266bf65e
30 changed files with 48 additions and 48 deletions

View file

@ -1,16 +1,16 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation
@objc public extension UIApplication {
@objc public var frontmostViewControllerIgnoringAlerts: UIViewController? {
public var frontmostViewControllerIgnoringAlerts: UIViewController? {
return findFrontmostViewController(ignoringAlerts: true)
}
@objc public var frontmostViewController: UIViewController? {
public var frontmostViewController: UIViewController? {
return findFrontmostViewController(ignoringAlerts: false)
}
@ -26,7 +26,7 @@ import Foundation
return viewController.findFrontmostViewController(ignoringAlerts)
}
@objc public func openSystemSettings() {
public func openSystemSettings() {
openURL(URL(string: UIApplication.openSettingsURLString)!)
}

View file

@ -288,6 +288,6 @@ extension OWSSound {
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertToUNNotificationSoundName(_ input: String) -> UNNotificationSoundName {
private func convertToUNNotificationSoundName(_ input: String) -> UNNotificationSoundName {
return UNNotificationSoundName(rawValue: input)
}

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation

View file

@ -1227,6 +1227,6 @@ extension CallViewController: CallVideoHintViewDelegate {
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertFromAVAudioSessionPort(_ input: AVAudioSession.Port) -> String {
private func convertFromAVAudioSessionPort(_ input: AVAudioSession.Port) -> String {
return input.rawValue
}

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation

View file

@ -175,7 +175,7 @@ public class LongTextViewController: OWSViewController {
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertToOptionalNSAttributedStringKeyDictionary(_ input: [String: Any]?) -> [NSAttributedString.Key: Any]? {
private func convertToOptionalNSAttributedStringKeyDictionary(_ input: [String: Any]?) -> [NSAttributedString.Key: Any]? {
guard let input = input else { return nil }
return Dictionary(uniqueKeysWithValues: input.map { key, value in (NSAttributedString.Key(rawValue: key), value)})
}

View file

@ -831,12 +831,12 @@ extension MediaPageViewController: CaptionContainerViewDelegate {
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertToOptionalUIPageViewControllerOptionsKeyDictionary(_ input: [String: Any]?) -> [UIPageViewController.OptionsKey: Any]? {
private func convertToOptionalUIPageViewControllerOptionsKeyDictionary(_ input: [String: Any]?) -> [UIPageViewController.OptionsKey: Any]? {
guard let input = input else { return nil }
return Dictionary(uniqueKeysWithValues: input.map { key, value in (UIPageViewController.OptionsKey(rawValue: key), value)})
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertFromUIPageViewControllerOptionsKey(_ input: UIPageViewController.OptionsKey) -> String {
private func convertFromUIPageViewControllerOptionsKey(_ input: UIPageViewController.OptionsKey) -> String {
return input.rawValue
}

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import UIKit

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation
@ -550,21 +550,21 @@ protocol CallAudioServiceDelegate: class {
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertFromAVAudioSessionPort(_ input: AVAudioSession.Port) -> String {
private func convertFromAVAudioSessionPort(_ input: AVAudioSession.Port) -> String {
return input.rawValue
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertFromAVAudioSessionCategory(_ input: AVAudioSession.Category) -> String {
private func convertFromAVAudioSessionCategory(_ input: AVAudioSession.Category) -> String {
return input.rawValue
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertFromAVAudioSessionMode(_ input: AVAudioSession.Mode) -> String {
private func convertFromAVAudioSessionMode(_ input: AVAudioSession.Mode) -> String {
return input.rawValue
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertToAVAudioSessionCategory(_ input: String) -> AVAudioSession.Category {
private func convertToAVAudioSessionCategory(_ input: String) -> AVAudioSession.Category {
return AVAudioSession.Category(rawValue: input)
}

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import UIKit

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
public protocol CaptionContainerViewDelegate: class {

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import UIKit

View file

@ -245,7 +245,7 @@ open class MarqueeLabel: UILabel, CAAnimationDelegate {
get {
switch speed {
case .duration(let duration): return duration
case .rate(_): return 0.0
case .rate: return 0.0
}
}
set {
@ -257,7 +257,7 @@ open class MarqueeLabel: UILabel, CAAnimationDelegate {
@IBInspectable open var scrollRate: CGFloat {
get {
switch speed {
case .duration(_): return 0.0
case .duration: return 0.0
case .rate(let rate): return rate
}
}
@ -1139,11 +1139,11 @@ open class MarqueeLabel: UILabel, CAAnimationDelegate {
return CAReplicatorLayer.self
}
fileprivate weak var repliLayer: CAReplicatorLayer? {
fileprivate var repliLayer: CAReplicatorLayer? {
return self.layer as? CAReplicatorLayer
}
fileprivate weak var maskLayer: CAGradientLayer? {
fileprivate var maskLayer: CAGradientLayer? {
return self.layer.mask as! CAGradientLayer?
}
@ -1168,7 +1168,7 @@ open class MarqueeLabel: UILabel, CAAnimationDelegate {
}
class fileprivate func notifyController(_ controller: UIViewController, message: MarqueeKeys) {
NotificationCenter.default.post(name: Notification.Name(rawValue: message.rawValue), object: nil, userInfo: ["controller" : controller])
NotificationCenter.default.post(name: Notification.Name(rawValue: message.rawValue), object: nil, userInfo: ["controller": controller])
}
@objc public func restartForViewController(_ notification: Notification) {
@ -1705,8 +1705,8 @@ public struct EdgeFade: OptionSet {
}
// Define helpful typealiases
fileprivate typealias MLAnimationCompletionBlock = (_ finished: Bool) -> Void
fileprivate typealias MLAnimation = (anim: CAKeyframeAnimation, duration: CGFloat)
private typealias MLAnimationCompletionBlock = (_ finished: Bool) -> Void
private typealias MLAnimation = (anim: CAKeyframeAnimation, duration: CGFloat)
private class GradientSetupAnimation: CABasicAnimation {
}
@ -1842,11 +1842,11 @@ fileprivate extension CAMediaTimingFunction {
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertFromCAMediaTimingFunctionName(_ input: CAMediaTimingFunctionName) -> String {
private func convertFromCAMediaTimingFunctionName(_ input: CAMediaTimingFunctionName) -> String {
return input.rawValue
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertToCAMediaTimingFunctionName(_ input: String) -> CAMediaTimingFunctionName {
private func convertToCAMediaTimingFunctionName(_ input: String) -> CAMediaTimingFunctionName {
return CAMediaTimingFunctionName(rawValue: input)
}

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import XCTest

View file

@ -794,12 +794,12 @@ extension AttachmentApprovalViewController: AttachmentApprovalInputAccessoryView
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertToOptionalUIPageViewControllerOptionsKeyDictionary(_ input: [String: Any]?) -> [UIPageViewController.OptionsKey: Any]? {
private func convertToOptionalUIPageViewControllerOptionsKeyDictionary(_ input: [String: Any]?) -> [UIPageViewController.OptionsKey: Any]? {
guard let input = input else { return nil }
return Dictionary(uniqueKeysWithValues: input.map { key, value in (UIPageViewController.OptionsKey(rawValue: key), value)})
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertFromUIPageViewControllerOptionsKey(_ input: UIPageViewController.OptionsKey) -> String {
private func convertFromUIPageViewControllerOptionsKey(_ input: UIPageViewController.OptionsKey) -> String {
return input.rawValue
}

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import UIKit

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation
@ -217,6 +217,6 @@ public class OWSAudioSession: NSObject {
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertFromAVAudioSessionCategory(_ input: AVAudioSession.Category) -> String {
private func convertFromAVAudioSessionCategory(_ input: AVAudioSession.Category) -> String {
return input.rawValue
}

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
@objc

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import UIKit

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import UIKit