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
556fb292
Commit
556fb292
authored
May 16, 2017
by
Oliver Wiese
Browse files
Options
Downloads
Patches
Plain Diff
fix protocols for mailprotocol
parent
5266a7c1
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!2
Swift3
,
!1
Ephemeral mail object
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
PersistentMail +CoreDataClass.swift
+1
-10
1 addition, 10 deletions
PersistentMail +CoreDataClass.swift
enzevalos_iphone/Mail.swift
+11
-1
11 additions, 1 deletion
enzevalos_iphone/Mail.swift
enzevalos_iphone/Record.swift
+3
-2
3 additions, 2 deletions
enzevalos_iphone/Record.swift
with
15 additions
and
13 deletions
PersistentMail +CoreDataClass.swift
+
1
−
10
View file @
556fb292
...
@@ -12,7 +12,7 @@ import Foundation
...
@@ -12,7 +12,7 @@ import Foundation
import
CoreData
import
CoreData
@objc
(
PersistentMail
)
@objc
(
PersistentMail
)
open
class
PersistentMail
:
NSManagedObject
,
Comparable
{
open
class
PersistentMail
:
NSManagedObject
,
Mail
{
var
showMessage
:
Bool
=
false
var
showMessage
:
Bool
=
false
...
@@ -180,12 +180,3 @@ open class PersistentMail: NSManagedObject, Comparable {
...
@@ -180,12 +180,3 @@ open class PersistentMail: NSManagedObject, Comparable {
return
"
\(
returnString
)\(
subj
)
"
return
"
\(
returnString
)\(
subj
)
"
}
}
}
}
public
func
==
(
lhs
:
PersistentMail
,
rhs
:
PersistentMail
)
->
Bool
{
return
lhs
.
date
==
rhs
.
date
&&
lhs
.
uid
==
rhs
.
uid
}
public
func
<
(
lhs
:
PersistentMail
,
rhs
:
PersistentMail
)
->
Bool
{
return
lhs
.
date
>
rhs
.
date
}
This diff is collapsed.
Click to expand it.
enzevalos_iphone/Mail.swift
+
11
−
1
View file @
556fb292
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
import
Foundation
import
Foundation
public
protocol
Mail
Protocol
{
public
protocol
Mail
:
Comparable
{
var
cc
:
NSSet
?
{
get
}
var
cc
:
NSSet
?
{
get
}
...
@@ -19,5 +19,15 @@ public protocol MailProtocol{
...
@@ -19,5 +19,15 @@ public protocol MailProtocol{
var
date
:
Date
{
get
}
var
date
:
Date
{
get
}
var
subject
:
String
?{
get
}
var
subject
:
String
?{
get
}
var
body
:
String
?{
get
}
var
body
:
String
?{
get
}
var
uid
:
UInt64
{
get
}
}
public
func
==<
T
:
Mail
>
(
lhs
:
T
,
rhs
:
T
)
->
Bool
{
return
lhs
.
date
==
rhs
.
date
&&
lhs
.
uid
==
rhs
.
uid
}
public
func
<<
T
:
Mail
>
(
lhs
:
T
,
rhs
:
T
)
->
Bool
{
return
lhs
.
date
>
rhs
.
date
}
}
This diff is collapsed.
Click to expand it.
enzevalos_iphone/Record.swift
+
3
−
2
View file @
556fb292
...
@@ -12,11 +12,12 @@ import UIKit
...
@@ -12,11 +12,12 @@ import UIKit
public
protocol
Record
:
Comparable
{
public
protocol
Record
:
Comparable
{
var
name
:
String
{
get
}
var
name
:
String
{
get
}
var
hasKey
:
Bool
{
get
}
var
hasKey
:
Bool
{
get
}
var
isVerified
:
Bool
{
get
}
var
isVerified
:
Bool
{
get
}
var
ezContact
:
EnzevalosContact
{
get
}
var
ezContact
:
EnzevalosContact
{
get
}
var
mails
:
[
Mail
]
{
get
}
var
mails
:
[
Persistent
Mail
]
{
get
}
var
cnContact
:
CNContact
?
{
get
}
var
cnContact
:
CNContact
?
{
get
}
var
color
:
UIColor
{
get
}
var
color
:
UIColor
{
get
}
var
image
:
UIImage
{
get
}
var
image
:
UIImage
{
get
}
...
@@ -24,5 +25,5 @@ public protocol Record: Comparable {
...
@@ -24,5 +25,5 @@ public protocol Record: Comparable {
func
addNewAddress
(
_
adr
:
MailAddress
)
->
Bool
func
addNewAddress
(
_
adr
:
MailAddress
)
->
Bool
func
addNewMail
(
_
mail
:
Mail
)
->
Bool
func
addNewMail
(
_
mail
:
Persistent
Mail
)
->
Bool
}
}
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