Compare commits

..

4 Commits

4 changed files with 23 additions and 2 deletions

@ -1 +1 @@
Subproject commit 48fb5f0889404370006ae12b3637a77d7d4ba485
Subproject commit 1a036c2321e06d4c36f3e2148e67dfe6aa379296

@ -1 +1 @@
Subproject commit 92eee153f2c14f97e50f44b10e2a0aeb5f8b190d
Subproject commit 2b20c2d2a45ad1005e794c704b3fc831ca1d3830

View File

@ -6,6 +6,9 @@
#include <solanaceae/tox_messages/components.hpp>
#include <solanaceae/contact/components.hpp>
// HACK: remove them
#include <solanaceae/tox_contacts/components.hpp>
#include <solanaceae/toxcore/utils.hpp>
#include <imgui/imgui.h>
#include <imgui/misc/cpp/imgui_stdlib.h>
@ -158,6 +161,16 @@ void ChatGui4::render(void) {
ImGui::Checkbox("show extra info", &_show_chat_extra_info);
ImGui::Checkbox("show avatar transfers", &_show_chat_avatar_tf);
ImGui::SeparatorText("tox");
if (_cr.all_of<Contact::Components::ToxGroupPersistent>(*_selected_contact)) {
if (ImGui::MenuItem("copy ngc chatid")) {
const auto& chat_id = _cr.get<Contact::Components::ToxGroupPersistent>(*_selected_contact).chat_id.data;
const auto chat_id_str = bin2hex(std::vector<uint8_t>{chat_id.begin(), chat_id.end()});
ImGui::SetClipboardText(chat_id_str.c_str());
}
}
ImGui::EndMenu();
}
ImGui::EndMenuBar();
@ -171,6 +184,8 @@ void ChatGui4::render(void) {
if (const auto* unread_storage = mm.storage<Message::Components::TagUnread>(); unread_storage != nullptr && !unread_storage->empty()) {
//assert(unread_storage->size() == 0);
//assert(unread_storage.cbegin() == unread_storage.cend());
#if 0
std::cout << "UNREAD ";
Message3 prev_ent = entt::null;
for (const Message3 e : mm.view<Message::Components::TagUnread>()) {
@ -181,6 +196,7 @@ void ChatGui4::render(void) {
prev_ent = e;
}
std::cout << "\n";
#endif
}
}

View File

@ -3,6 +3,7 @@
#include "./image_loader_sdl_bmp.hpp"
#include "./image_loader_stb.hpp"
#include "./image_loader_webp.hpp"
#include "./media_meta_info_loader.hpp"
#include <solanaceae/message3/components.hpp>
@ -22,6 +23,10 @@ std::optional<TextureEntry> MessageImageLoader::load(TextureUploaderI& tu, Messa
return std::nullopt;
}
if (m.all_of<Message::Components::TagNotImage>()) {
return std::nullopt;
}
if (m.all_of<Message::Components::Transfer::FileInfoLocal>()) {
const auto& file_list = m.get<Message::Components::Transfer::FileInfoLocal>().file_list;
assert(!file_list.empty());