summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/MessageSnippet.cpp')
-rw-r--r--Swift/QtUI/MessageSnippet.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/Swift/QtUI/MessageSnippet.cpp b/Swift/QtUI/MessageSnippet.cpp
index 995248a..ebcc829 100644
--- a/Swift/QtUI/MessageSnippet.cpp
+++ b/Swift/QtUI/MessageSnippet.cpp
@@ -11,21 +11,21 @@
namespace Swift {
-MessageSnippet::MessageSnippet(const QString& message, const QString& sender, const QDateTime& time, const QString& iconURI, bool isIncoming, bool appendToPrevious) : ChatSnippet(appendToPrevious) {
+MessageSnippet::MessageSnippet(const QString& message, const QString& sender, const QDateTime& time, const QString& iconURI, bool isIncoming, bool appendToPrevious, QtChatTheme* theme) : ChatSnippet(appendToPrevious) {
if (isIncoming) {
if (appendToPrevious) {
- content_ = loadTemplate(":/themes/Default/Incoming/NextContent.html");
+ content_ = theme->getIncomingNextContent();
}
else {
- content_ = loadTemplate(":/themes/Default/Incoming/Content.html");
+ content_ = theme->getIncomingContent();
}
}
else {
if (appendToPrevious) {
- content_ = loadTemplate(":/themes/Default/Outgoing/NextContent.html");
+ content_ = theme->getOutgoingNextContent();
}
else {
- content_ = loadTemplate(":/themes/Default/Outgoing/Content.html");
+ content_ = theme->getOutgoingContent();
}
}
@@ -35,4 +35,8 @@ MessageSnippet::MessageSnippet(const QString& message, const QString& sender, co
content_.replace("%userIconPath%", escape(iconURI));
}
+MessageSnippet::~MessageSnippet() {
+
+}
+
}