Skip to content
Snippets Groups Projects
Commit 4ed61100 authored by cruxfilm's avatar cruxfilm
Browse files

Fixed merge conflict in DisplayProtocols.

parent e3aa8d28
No related branches found
No related tags found
1 merge request!74Integration of new ComposeView
......@@ -8,18 +8,25 @@
import Foundation
import SwiftUI
//TODO DOcumentView?? StateObject
// TODO: DocumentView?? StateObject
/*
Here are protocols to display an email, key, address and a contact
*/
/// Enums
enum FolderType {
case Archive, Trash, Inbox, Sent, Draft, Other
case Archive
case Trash
case Inbox
case Sent
case Draft
case Other
}
enum ResponseType {
case Reply, Forward, Draft
case Reply
case Forward
case Draft
func addPrefix(subject: String) -> String {
switch self {
......@@ -38,7 +45,14 @@ enum ResponseType {
}
enum CryptoState {
case UnableToDecrypt, InvalidSignature, NoCrypto, PlainMissingPublicKeyToVerify, PlainButValidSignature, EncValidSign, EncNoSignature, EncButMissingPublicKeyToVerify
case UnableToDecrypt
case InvalidSignature
case NoCrypto
case PlainMissingPublicKeyToVerify
case PlainButValidSignature
case EncValidSign
case EncNoSignature
case EncButMissingPublicKeyToVerify
var buttonActions: [ButtonAction] {
get {
......@@ -54,12 +68,11 @@ enum CryptoState {
}
}
}
}
enum ContactSecurityRating {
case Trustworthy, Forgable
case Trustworthy
case Forgable
var name: LocalizedStringKey {
switch self {
......@@ -82,7 +95,6 @@ enum ContactSecurityRating {
protocol DisplayKey {
var keyID: String { get }
var discovery: Date? { get }
var lastSeen: Date? { get }
......@@ -129,9 +141,7 @@ protocol DisplayContact {
}
extension DisplayContact {
func findAddress(temp: Bool) -> MailAddress {
func findAddress(temp: Bool) -> AddressRecord {
if let addr = PersistentDataProvider.dataProvider.fetchedAddressResultController.fetchedObjects?.first {
return addr
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment