Defined the "openWikipediaApp(with: )" function in the LocationsListCoordination protocol and implement it in the LocationsListCoordinator coordinator.
This commit is contained in:
parent
dc7dbfb61a
commit
8dd4de175b
@ -61,4 +61,12 @@ extension LocationsListCoordinator: LocationsListCoordination {
|
||||
)
|
||||
}
|
||||
|
||||
func openWikipediaApp(with url: URL) {
|
||||
guard UIApplication.shared.canOpenURL(url) else {
|
||||
return
|
||||
}
|
||||
|
||||
UIApplication.shared.open(url)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -6,10 +6,13 @@
|
||||
// Copyright © 2023 Röck+Cöde. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
protocol LocationsListCoordination: AnyObject {
|
||||
|
||||
// MARK: Functions
|
||||
|
||||
func openLocationsAddScreen()
|
||||
func openWikipediaApp(with url: URL)
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user