Skip to content
Snippets Groups Projects
Commit 6054870f authored by cruxfilm's avatar cruxfilm
Browse files

Resolves duplicates

parent 78b50b2b
No related branches found
No related tags found
1 merge request!74Integration of new ComposeView
......@@ -15,10 +15,6 @@ struct ContactView <C: DisplayContact, M: DisplayMail>: View {
public var fromMail: M?
public var derivedFromKey: Bool = true
// init(contact: C, fromMail: M? = nil) {
// self.contact = contact
// }
var body: some View {
TabView{
ForEach(Tabs, id: \.id ){ tab in
......
......@@ -51,6 +51,7 @@ struct MailListView: View {
.padding(-10)
// Toolbar
HStack {
self.idButton
Spacer()
self.lastUpdate
Spacer()
......@@ -70,6 +71,12 @@ struct MailListView: View {
.resignKeyboardOnDragGesture() // hide keyboard when dragging
}
private var idButton: some View {
Button(action: { print("Go to my id") }) {
Text(NSLocalizedString("KeyID", comment: "id"))
}
}
private var composeButton: some View {
Button(action: {
composeMail = true
......@@ -115,14 +122,11 @@ struct MailListView: View {
let query = self.searchText.lowercased()
if (searchType == .All || searchType == .Sender) && (containsSearchTerms(content: keyRecord.sender.displayname, searchText: query) || containsSearchTerms(content: keyRecord.sender.email, searchText: query)) {
return true
}
else if (searchType == .All || searchType == .Sender) && keyRecord.addresses.filter({containsSearchTerms(content: $0.email, searchText: query)}).count > 0 {
} else if (searchType == .All || searchType == .Sender) && keyRecord.addresses.filter({containsSearchTerms(content: $0.email, searchText: query)}).count > 0 {
return true
}
else if (searchType == .All || searchType == .Subject) && containsSearchTerms(content: keyRecord.subject, searchText: query){
} else if (searchType == .All || searchType == .Subject) && containsSearchTerms(content: keyRecord.subject, searchText: query){
return true
}
else if (searchType == .All || searchType == .Body) && containsSearchTerms(content: keyRecord.body, searchText: query){
} else if (searchType == .All || searchType == .Body) && containsSearchTerms(content: keyRecord.body, searchText: query){
return true
}
return false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment