mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:31:27 +00:00
Run SwiftFormat.
This commit is contained in:
@@ -15,34 +15,34 @@ final class ShareToMapsAppActivity: UIActivity {
|
||||
case google
|
||||
case osm
|
||||
}
|
||||
|
||||
|
||||
private let type: MapsAppType
|
||||
private let location: CLLocationCoordinate2D
|
||||
private let senderName: String?
|
||||
|
||||
|
||||
init(type: MapsAppType, location: CLLocationCoordinate2D, senderName: String?) {
|
||||
self.type = type
|
||||
self.location = location
|
||||
self.senderName = senderName
|
||||
super.init()
|
||||
}
|
||||
|
||||
|
||||
override private init() {
|
||||
fatalError()
|
||||
}
|
||||
|
||||
|
||||
override var activityTitle: String? {
|
||||
type.activityTitle
|
||||
}
|
||||
|
||||
|
||||
override var activityType: UIActivity.ActivityType {
|
||||
.shareToMapsApp
|
||||
}
|
||||
|
||||
|
||||
override func canPerform(withActivityItems activityItems: [Any]) -> Bool {
|
||||
true
|
||||
}
|
||||
|
||||
|
||||
override func prepare(withActivityItems activityItems: [Any]) {
|
||||
UIApplication.shared.open(type.activityURL(for: location, senderName: senderName), options: [:]) { [weak self] result in
|
||||
self?.activityDidFinish(result)
|
||||
@@ -76,7 +76,7 @@ extension ShareToMapsAppActivity.MapsAppType {
|
||||
return url
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var activityTitle: String {
|
||||
switch self {
|
||||
case .apple:
|
||||
|
||||
Reference in New Issue
Block a user