Skip to content
Snippets Groups Projects
Commit 902cb3b9 authored by cruxfilm's avatar cruxfilm
Browse files

Fixed merge conflict in SenderViewMain.

parent 352214a4
No related branches found
No related tags found
1 merge request!74Integration of new ComposeView
......@@ -23,11 +23,10 @@ import SwiftUI
import CoreLocation
struct SenderViewMain <M: DisplayMail>: View {
// SEE: PersonNameComponents
@EnvironmentObject var model: ReadModel<M>
@State var selectedLandmark: Landmark? = nil
@State var showingLandmarkDetails = false
......@@ -73,19 +72,19 @@ struct SenderViewMain <M: DisplayMail>: View {
}
private var icon: some View {
model.mail.sender.avatar
.resizable()
.frame(width: 130, height: 110)
.clipShape(Circle())
.overlay(Circle().stroke(Color.white, lineWidth: 4))
.shadow(radius: 10)
.offset(y: -110/2)
.padding(.bottom, -110/2)
.onTapGesture {
self.goToContact(contact: self.model.mail.sender)
NavigationLink(destination: ContactView(contact: model.mail.sender, fromMail: model.mail)) {
model.mail.sender.avatar
.resizable()
.frame(width: 130, height: 110)
.clipShape(Circle())
.overlay(Circle().stroke(Color.white, lineWidth: 4))
.shadow(radius: 10)
.offset(y: -110/2)
.padding(.bottom, -110/2)
}
}
private var sender: some View {
VStack (alignment: .leading, spacing: 10) {
HStack {
......@@ -108,13 +107,13 @@ struct SenderViewMain <M: DisplayMail>: View {
}
HStack{
Text(String(format: NSLocalizedString("ReadView.Sender.Previous", comment: "100 previous received mails"), model.mail.sender.previousMails))
Spacer()
Spacer()
Text(String(format: NSLocalizedString("ReadView.Sender.Responses", comment: "5 previous sent mails"), model.mail.sender.previousResponses))
// TODO: Add last mail date
// TODO: Go to mails?
}
}
.padding(10)
.padding(10)
}
private var map: some View {
......@@ -154,16 +153,16 @@ struct SenderViewMain <M: DisplayMail>: View {
} .alert(isPresented: $showingLandmarkDetails) {
/// alert displays the landmark details and gets trigered when the user taps the information button of a landmark
Alert(title: Text("Domain for this location"), message: Text(selectedLandmark?.domain ?? "Missing place information"), dismissButton: .default(Text("OK")) )
}
}
}
}
private func goToContact(contact: M.C) {
/* guard let con = contact.keyRecord else {
print("No record...")
return
}
AppDelegate.getAppDelegate().readViewCoordinator?.pushContactView(contact: con) */
/* guard let con = contact.keyRecord else {
print("No record...")
return
}
AppDelegate.getAppDelegate().readViewCoordinator?.pushContactView(contact: con) */
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment