Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
enzevalos_iphone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
enzevalos
enzevalos_iphone
Commits
4ed61100
Commit
4ed61100
authored
Mar 18, 2021
by
cruxfilm
Browse files
Options
Downloads
Patches
Plain Diff
Fixed merge conflict in DisplayProtocols.
parent
e3aa8d28
No related branches found
No related tags found
1 merge request
!74
Integration of new ComposeView
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
enzevalos_iphone/SwiftUI/DisplayProtocols.swift
+59
-49
59 additions, 49 deletions
enzevalos_iphone/SwiftUI/DisplayProtocols.swift
with
59 additions
and
49 deletions
enzevalos_iphone/SwiftUI/DisplayProtocols.swift
+
59
−
49
View file @
4ed61100
...
...
@@ -8,18 +8,25 @@
import
Foundation
import
SwiftUI
//TODO D
O
cumentView?? StateObject
//
TODO
:
D
o
cumentView?? 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
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment