diff --git a/src/chat_gui4.cpp b/src/chat_gui4.cpp index b102196..31547d4 100644 --- a/src/chat_gui4.cpp +++ b/src/chat_gui4.cpp @@ -6,6 +6,9 @@ #include #include +// HACK: remove them +#include +#include #include #include @@ -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(*_selected_contact)) { + if (ImGui::MenuItem("copy ngc chatid")) { + const auto& chat_id = _cr.get(*_selected_contact).chat_id.data; + const auto chat_id_str = bin2hex(std::vector{chat_id.begin(), chat_id.end()}); + ImGui::SetClipboardText(chat_id_str.c_str()); + } + } + ImGui::EndMenu(); } ImGui::EndMenuBar();