diff options
-rw-r--r-- | tests/teststore.cpp | 11 | ||||
-rw-r--r-- | views/conversation/main.qml | 32 |
2 files changed, 40 insertions, 3 deletions
diff --git a/tests/teststore.cpp b/tests/teststore.cpp index aafd56aa..817101be 100644 --- a/tests/teststore.cpp +++ b/tests/teststore.cpp | |||
@@ -77,6 +77,17 @@ static void createMail(const QVariantMap &object, const QByteArray &folder = {}) | |||
77 | {}, | 77 | {}, |
78 | {}, | 78 | {}, |
79 | {}); | 79 | {}); |
80 | if (object.contains("messageId")) { | ||
81 | msg->messageID(true)->from7BitString(object["messageId"].toByteArray()); | ||
82 | } | ||
83 | if (object.contains("inReplyTo")) { | ||
84 | msg->inReplyTo(true)->from7BitString(object["inReplyTo"].toByteArray()); | ||
85 | } | ||
86 | if (object.contains("date")) { | ||
87 | msg->date(true)->setDateTime(QDateTime::fromString(object["date"].toString(), Qt::ISODate)); | ||
88 | } | ||
89 | |||
90 | msg->assemble(); | ||
80 | 91 | ||
81 | auto mail = ApplicationDomainType::createEntity<Mail>(object["resource"].toByteArray()); | 92 | auto mail = ApplicationDomainType::createEntity<Mail>(object["resource"].toByteArray()); |
82 | mail.setMimeMessage(msg->encodedContent(true)); | 93 | mail.setMimeMessage(msg->encodedContent(true)); |
diff --git a/views/conversation/main.qml b/views/conversation/main.qml index 10c25706..06b59b42 100644 --- a/views/conversation/main.qml +++ b/views/conversation/main.qml | |||
@@ -56,13 +56,39 @@ ApplicationWindow { | |||
56 | name: "Folder 1", | 56 | name: "Folder 1", |
57 | mails: [{ | 57 | mails: [{ |
58 | resource: "resource1", | 58 | resource: "resource1", |
59 | subject: "subject", | 59 | messageId: "<msg1@test.com>", |
60 | date: "2017-07-24T15:46:29", | ||
61 | subject: "subject1", | ||
60 | body: "body", | 62 | body: "body", |
61 | to: ["to@example.org"], | 63 | to: ["to@example.org"], |
62 | cc: ["cc@example.org"], | 64 | cc: ["cc@example.org"], |
63 | bcc: ["bcc@example.org"], | 65 | bcc: ["bcc@example.org"], |
64 | draft: true | 66 | }, |
65 | }] | 67 | { |
68 | resource: "resource1", | ||
69 | inReplyTo: "<msg1@test.com>", | ||
70 | date: "2017-07-24T16:46:29", | ||
71 | subject: "subject2", | ||
72 | body: "body2", | ||
73 | to: ["to@example.org"], | ||
74 | }, | ||
75 | { | ||
76 | resource: "resource1", | ||
77 | inReplyTo: "<msg1@test.com>", | ||
78 | date: "2017-07-24T17:46:29", | ||
79 | subject: "subject3", | ||
80 | body: "body3\n\n\n\nfoo\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThe End", | ||
81 | to: ["to@example.org"], | ||
82 | }, | ||
83 | { | ||
84 | resource: "resource1", | ||
85 | inReplyTo: "<msg1@test.com>", | ||
86 | date: "2017-07-24T18:46:29", | ||
87 | subject: "subject4", | ||
88 | body: "body4", | ||
89 | to: ["to@example.org"], | ||
90 | }, | ||
91 | ] | ||
66 | }], | 92 | }], |
67 | } | 93 | } |
68 | TestStore.setup(initialState) | 94 | TestStore.setup(initialState) |