Commit 0f19db4a authored by Oliver Wiese's avatar Oliver Wiese

Refactor code (PseudoMail etc + Display-Protocols)

parent 1aea56ff
......@@ -118,6 +118,8 @@
477548DE21F5DABE000B22A8 /* MailServerConnectionError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 477548DD21F5DABE000B22A8 /* MailServerConnectionError.swift */; };
477548E221F77466000B22A8 /* SecurityIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 477548E121F77466000B22A8 /* SecurityIndicator.swift */; };
477548E421F77BA0000B22A8 /* StudyParameterProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 477548E321F77BA0000B22A8 /* StudyParameterProtocol.swift */; };
4775D7A8243F0D630052F2CC /* DisplayProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4775D7A7243F0D630052F2CC /* DisplayProtocols.swift */; };
4775D7AA243F0E260052F2CC /* SimulatorData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4775D7A9243F0E260052F2CC /* SimulatorData.swift */; };
477670C4228453FB00043604 /* ButtonCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 477670C3228453FB00043604 /* ButtonCell.xib */; };
477670C6228454F700043604 /* ButtonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 477670C5228454F700043604 /* ButtonCell.swift */; };
478154A721FF3F0900A931EC /* Warning.swift in Sources */ = {isa = PBXBuildFile; fileRef = 478154A621FF3F0900A931EC /* Warning.swift */; };
......@@ -565,6 +567,8 @@
477548DD21F5DABE000B22A8 /* MailServerConnectionError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MailServerConnectionError.swift; sourceTree = "<group>"; };
477548E121F77466000B22A8 /* SecurityIndicator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecurityIndicator.swift; sourceTree = "<group>"; };
477548E321F77BA0000B22A8 /* StudyParameterProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StudyParameterProtocol.swift; sourceTree = "<group>"; };
4775D7A7243F0D630052F2CC /* DisplayProtocols.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisplayProtocols.swift; sourceTree = "<group>"; };
4775D7A9243F0E260052F2CC /* SimulatorData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimulatorData.swift; sourceTree = "<group>"; };
477670C3228453FB00043604 /* ButtonCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ButtonCell.xib; sourceTree = "<group>"; };
477670C5228454F700043604 /* ButtonCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonCell.swift; sourceTree = "<group>"; };
478154A621FF3F0900A931EC /* Warning.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Warning.swift; sourceTree = "<group>"; };
......@@ -1102,6 +1106,7 @@
476406872416B54D00C7D426 /* SwiftUI */ = {
isa = PBXGroup;
children = (
4775D7A6243F0D310052F2CC /* Data */,
47C8224124379EAE005BCE73 /* Read */,
47EABF2E24240BA400774A93 /* AccountSetup */,
476406882416B54D00C7D426 /* Inbox */,
......@@ -1199,6 +1204,15 @@
path = "study parameters";
sourceTree = "<group>";
};
4775D7A6243F0D310052F2CC /* Data */ = {
isa = PBXGroup;
children = (
4775D7A7243F0D630052F2CC /* DisplayProtocols.swift */,
4775D7A9243F0E260052F2CC /* SimulatorData.swift */,
);
path = Data;
sourceTree = "<group>";
};
478154AA21FF6A5300A931EC /* mailbot */ = {
isa = PBXGroup;
children = (
......@@ -2256,6 +2270,7 @@
479C649B21F45DAF00A01071 /* PasswordToggleVisibilityView.swift in Sources */,
47691A8C1ECC3EC7004BCFC5 /* EphemeralMail.swift in Sources */,
A5E303D824110F6400310264 /* smime-helpers.c in Sources */,
4775D7A8243F0D630052F2CC /* DisplayProtocols.swift in Sources */,
A142E70921E7919F000395E3 /* IntroContactViewController.swift in Sources */,
8428A8671F436A11007649A5 /* SubBadgeHeaderTableViewCell.swift in Sources */,
A1EB05981D956947008659C1 /* InboxViewController.swift in Sources */,
......@@ -2338,6 +2353,7 @@
A1EB05841D956867008659C1 /* TableViewDataDelegate.swift in Sources */,
8428A85E1F436A05007649A5 /* CircleView.swift in Sources */,
A182182C21E5072200918A29 /* IntroDescriptionViewController.swift in Sources */,
4775D7AA243F0E260052F2CC /* SimulatorData.swift in Sources */,
F1C7AC821FED6473007629DB /* AboutViewController.swift in Sources */,
47C8225324379EAE005BCE73 /* AttachmentsViewMain.swift in Sources */,
A182183421E51DD200918A29 /* IntroContactCell.swift in Sources */,
......
This diff is collapsed.
This diff is collapsed.
......@@ -96,16 +96,14 @@ struct Tab {
#if DEBUG
struct Layout_Previews: PreviewProvider {
static let simulator = Simulators<ReadMainView<PseuoMail>>()
static let deviceNames: [String] = [
"iPhone SE",
"iPhone 11 Pro Max"
]
static var previews: some View {
ForEach(Layout_Previews.deviceNames, id: \.self) {deviceName in
ReadMainView<PseuoMail>(mail: mail)
.previewDisplayName(deviceName)
.previewDevice(.init(rawValue: deviceName))
}
simulator.previews(view: ReadMainView(mail: DummyData.SecureMail))
}
}
#endif
......
......@@ -244,16 +244,7 @@ struct MessageViewMain <M: DisplayMail>: View {
struct MessageViewMain_Previews: PreviewProvider {
static var previews: some View {
let deviceNames: [String] = [
"iPhone SE",
"iPhone 11 Pro Max"
]
return ForEach(deviceNames, id: \.self) {deviceName in
MessageViewMain(mail: mail)
.previewDisplayName(deviceName)
.previewDevice(.init(rawValue: deviceName))
}
let sim = Simulators<MessageViewMain<PseuoMail>>()
return sim.previews(view: MessageViewMain(mail: DummyData.SecureMail))
}
}
......@@ -176,15 +176,7 @@ struct SenderViewMain <M: DisplayMail>: View {
struct SenderView_Previews: PreviewProvider {
static var previews: some View {
let deviceNames: [String] = [
"iPhone SE",
"iPhone 11 Pro Max"
]
return ForEach(deviceNames, id: \.self) {deviceName in
SenderViewMain<PseuoMail>(mail: mail)
.previewDisplayName(deviceName)
.previewDevice(.init(rawValue: deviceName))
}
let sim = Simulators<SenderViewMain<PseuoMail>>()
return sim.previews(view: SenderViewMain(mail: DummyData.SecureMail))
}
}
......@@ -80,7 +80,7 @@ struct DialogView <D: Dialog> : View {
}
struct DialogView_Previews: PreviewProvider {
static let options = mail.dialog
static let options = DummyData.SecureMail.dialog
static var previews: some View {
ScrollView{
DialogView(option: options, ctaAction: action, additionalAction: action, dismissAction: action, extend: false)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment