diff options
Diffstat (limited to 'tests')
-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); |