forked from Green-Sky/tomato
update plug and add chat debugging
This commit is contained in:
parent
da774e10e8
commit
5c4c397f6c
2
external/solanaceae_plugin
vendored
2
external/solanaceae_plugin
vendored
@ -1 +1 @@
|
|||||||
Subproject commit d41efddf56f710c99a8a86041cdc2d861322ebb0
|
Subproject commit 3bcb504a71db7be063df8f2490f5dc183d34aa65
|
@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
#include "./media_meta_info_loader.hpp"
|
#include "./media_meta_info_loader.hpp"
|
||||||
#include "./sdl_clipboard_utils.hpp"
|
#include "./sdl_clipboard_utils.hpp"
|
||||||
#include "solanaceae/message3/registry_message_model.hpp"
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <variant>
|
#include <variant>
|
||||||
@ -158,6 +157,25 @@ void ChatGui4::render(void) {
|
|||||||
|
|
||||||
auto* msg_reg_ptr = _rmm.get(*_selected_contact);
|
auto* msg_reg_ptr = _rmm.get(*_selected_contact);
|
||||||
|
|
||||||
|
if (msg_reg_ptr != nullptr) {
|
||||||
|
const auto& mm = *msg_reg_ptr;
|
||||||
|
//const auto& unread_storage = mm.storage<Message::Components::TagUnread>();
|
||||||
|
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());
|
||||||
|
std::cout << "UNREAD ";
|
||||||
|
Message3 prev_ent = entt::null;
|
||||||
|
for (const Message3 e : mm.view<Message::Components::TagUnread>()) {
|
||||||
|
std::cout << entt::to_integral(e) << " ";
|
||||||
|
if (prev_ent == e) {
|
||||||
|
assert(false && "dup");
|
||||||
|
}
|
||||||
|
prev_ent = e;
|
||||||
|
}
|
||||||
|
std::cout << "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
constexpr ImGuiTableFlags table_flags =
|
constexpr ImGuiTableFlags table_flags =
|
||||||
ImGuiTableFlags_BordersInnerV |
|
ImGuiTableFlags_BordersInnerV |
|
||||||
ImGuiTableFlags_RowBg |
|
ImGuiTableFlags_RowBg |
|
||||||
@ -653,6 +671,15 @@ bool ChatGui4::renderContactListContactBig(const Contact3 c, const bool selected
|
|||||||
bool has_unread = false;
|
bool has_unread = false;
|
||||||
if (const auto* mm = _rmm.get(c); mm != nullptr) {
|
if (const auto* mm = _rmm.get(c); mm != nullptr) {
|
||||||
if (const auto* unread_storage = mm->storage<Message::Components::TagUnread>(); unread_storage != nullptr && !unread_storage->empty()) {
|
if (const auto* unread_storage = mm->storage<Message::Components::TagUnread>(); unread_storage != nullptr && !unread_storage->empty()) {
|
||||||
|
#if 0
|
||||||
|
assert(unread_storage.size() == 0);
|
||||||
|
assert(unread_storage.cbegin() == unread_storage.cend());
|
||||||
|
std::cout << "UNREAD ";
|
||||||
|
for (const auto e : mm->view<Message::Components::TagUnread>()) {
|
||||||
|
std::cout << entt::to_integral(e) << " ";
|
||||||
|
}
|
||||||
|
std::cout << "\n";
|
||||||
|
#endif
|
||||||
has_unread = true;
|
has_unread = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user