diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-01-27 02:12:37 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-08-19 00:14:44 +0200 |
commit | cccd4e8695744a02a50e449a248c7c7a46f3c321 (patch) | |
tree | f9f44c9570baab67c952912600eb84fc9ae162ab /tests/main.cpp | |
parent | f58f8a9fc33516d327620fe0059b8b855a246d30 (diff) |
Update dchat core
Diffstat (limited to 'tests/main.cpp')
-rw-r--r-- | tests/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/main.cpp b/tests/main.cpp index 1b9231c..0fd291c 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -1,5 +1,5 @@ #include "../include/DynamicImage.hpp" -#include <dchat/MessageComposer.hpp> +#include <dchat/IncomingMessage.hpp> #include <stdio.h> #include <vector> #include <string.h> @@ -26,16 +26,16 @@ static void applyRichText(Gtk::TextView *textView, const Glib::ustring &text) buffer->set_text(""); Gtk::TextIter iter = buffer->get_iter_at_offset(0); - dchat::compose(text.data(), text.bytes(), [textView, &text, &iter, &buffer](dchat::MessagePart messagePart) + dchat::parseIncomingMessage(text.data(), text.bytes(), [textView, &text, &iter, &buffer](dchat::IncomingMessagePart messagePart) { switch(messagePart.type) { - case dchat::MessagePart::Type::TEXT: + case dchat::IncomingMessagePart::Type::TEXT: { iter = buffer->insert(iter, text.data() + messagePart.textRange.start, text.data() + messagePart.textRange.end); break; } - case dchat::MessagePart::Type::EMOJI: + case dchat::IncomingMessagePart::Type::EMOJI: { auto anchor = Gtk::TextChildAnchor::create(); iter = buffer->insert_child_anchor(iter, anchor); |