Add custom string representations of view model/coordinator results.

This commit is contained in:
Doug
2022-06-15 19:10:58 +01:00
committed by Doug
parent e3820a6aea
commit e8899f134e
10 changed files with 148 additions and 8 deletions
@@ -18,9 +18,17 @@ import SwiftUI
// MARK: View model
enum ChangePasswordViewModelResult {
enum ChangePasswordViewModelResult: CustomStringConvertible {
/// Submit with old and new passwords and sign out of all devices option
case submit(oldPassword: String, newPassword: String, signoutAllDevices: Bool)
/// A string representation of the result, ignoring any associated values that could leak PII.
var description: String {
switch self {
case .submit:
return "submit"
}
}
}
// MARK: View