This PR contains the work done to add a location at a time and updates the locations in the list of locations screen right after. To give further details about the work done: - [x] implemented the `LocationProvider` provider in the **Persistence** library; - [x] implemented the `SaveLocalLocationUseCase` use case; - [x] defined the properties and functions of the `LocationsAddViewModeling` protocol to support the clean, updating and saving of locations; - [x] implemented the `LocationsAddViewModel` view model; - [x] implemented the `LocationsAddViewController` view controller; - [x] implemented the dismissal of the `LocationsAddCoordinator` coordinator. Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Reviewed-on: rock-n-code/deep-linking-assignment#11
26 lines
535 B
Swift
26 lines
535 B
Swift
//
|
|
// LocationsAddViewModeling.swift
|
|
// Locations
|
|
//
|
|
// Created by Javier Cicchelli on 11/04/2023.
|
|
// Copyright © 2023 Röck+Cöde. All rights reserved.
|
|
//
|
|
|
|
import Combine
|
|
|
|
protocol LocationsAddViewModeling: AnyObject {
|
|
|
|
// MARK: Properties
|
|
|
|
var coordinator: LocationsAddCoordination? { get set }
|
|
|
|
var locationExistsPublisher: Published<Bool>.Publisher { get }
|
|
|
|
// MARK: Functions
|
|
|
|
func cleanLocation()
|
|
func saveLocation()
|
|
func setLocation(latitude: Float, longitude: Float)
|
|
|
|
}
|