static asan and reorder forward/open
Some checks failed
ContinuousDelivery / windows (push) Waiting to run
ContinuousDelivery / windows-asan (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
ContinuousDelivery / linux-ubuntu (push) Failing after 5m16s
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Failing after 6m52s
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Failing after 6m30s
ContinuousIntegration / linux (push) Successful in 4m30s
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Failing after 6m13s
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Failing after 6m4s

This commit is contained in:
Green Sky 2024-08-10 10:53:57 +02:00
parent b48d7e3cfd
commit b133c5f79f
No known key found for this signature in database
3 changed files with 26 additions and 26 deletions

View File

@ -30,6 +30,7 @@ if (TOMATO_ASAN)
#link_libraries(-fsanitize=address) #link_libraries(-fsanitize=address)
link_libraries(-fsanitize=address,undefined) link_libraries(-fsanitize=address,undefined)
#link_libraries(-fsanitize=undefined) #link_libraries(-fsanitize=undefined)
link_libraries(-static-libasan) # make it "work" on nix
message("II enabled ASAN") message("II enabled ASAN")
else() else()
message("!! can not enable ASAN on this platform (gcc/clang + win)") message("!! can not enable ASAN on this platform (gcc/clang + win)")

View File

@ -139,7 +139,10 @@
pkg-config pkg-config
]; ];
shellHook = "echo hello to tomato dev shell!"; shellHook = ''
echo hello to tomato dev shell!
export LD_LIBRARY_PATH=/run/opengl-driver/lib
'';
}; };
apps.default = { apps.default = {

View File

@ -1176,31 +1176,6 @@ void ChatGui4::renderMessageBodyFile(Message3Registry& reg, const Message3 e) {
if (o.all_of<ObjComp::F::SingleInfoLocal>()) { if (o.all_of<ObjComp::F::SingleInfoLocal>()) {
const auto& local_info = o.get<ObjComp::F::SingleInfoLocal>(); const auto& local_info = o.get<ObjComp::F::SingleInfoLocal>();
if (!local_info.file_path.empty() && ImGui::BeginPopupContextItem("##file_c")) { if (!local_info.file_path.empty() && ImGui::BeginPopupContextItem("##file_c")) {
if (o.all_of<ObjComp::F::TagLocalHaveAll>()) {
if (ImGui::BeginMenu("forward")) {
for (const auto& c : _cr.view<Contact::Components::TagBig>()) {
// filter
if (_cr.any_of<Contact::Components::RequestIncoming, Contact::Components::TagRequestOutgoing>(c)) {
continue;
}
// TODO: check for contact capability
// or just error popup?/noti/toast
if (renderContactBig(_theme, _contact_tc, {_cr, c}, 1, false, true, false)) {
// TODO: try object interface first instead, then fall back to send with SingleInfoLocal
//_rmm.sendFileObj(c, o);
std::filesystem::path path = o.get<ObjComp::F::SingleInfoLocal>().file_path;
_rmm.sendFilePath(c, path.filename().generic_u8string(), path.generic_u8string());
}
}
ImGui::EndMenu();
}
} else {
ImGui::TextDisabled("forward");
}
ImGui::Separator();
if (ImGui::MenuItem("open")) { if (ImGui::MenuItem("open")) {
const std::string url {file_path_to_file_url(local_info.file_path)}; const std::string url {file_path_to_file_url(local_info.file_path)};
std::cout << "opening file '" << url << "'\n"; std::cout << "opening file '" << url << "'\n";
@ -1209,6 +1184,27 @@ void ChatGui4::renderMessageBodyFile(Message3Registry& reg, const Message3 e) {
ImGui::Separator(); ImGui::Separator();
if (ImGui::BeginMenu("forward", o.all_of<ObjComp::F::TagLocalHaveAll>())) {
for (const auto& c : _cr.view<Contact::Components::TagBig>()) {
// filter
if (_cr.any_of<Contact::Components::RequestIncoming, Contact::Components::TagRequestOutgoing>(c)) {
continue;
}
// TODO: check for contact capability
// or just error popup?/noti/toast
if (renderContactBig(_theme, _contact_tc, {_cr, c}, 1, false, true, false)) {
// TODO: try object interface first instead, then fall back to send with SingleInfoLocal
//_rmm.sendFileObj(c, o);
std::filesystem::path path = o.get<ObjComp::F::SingleInfoLocal>().file_path;
_rmm.sendFilePath(c, path.filename().generic_u8string(), path.generic_u8string());
}
}
ImGui::EndMenu();
}
ImGui::Separator();
if (ImGui::MenuItem("copy file")) { if (ImGui::MenuItem("copy file")) {
const std::string url {file_path_to_file_url(local_info.file_path)}; const std::string url {file_path_to_file_url(local_info.file_path)};
//ImGui::SetClipboardText(url.c_str()); //ImGui::SetClipboardText(url.c_str());