fix: resolve context menu race condition and add debug logs

This commit is contained in:
spinline
2026-01-31 13:30:23 +03:00
parent aa7bfaf6f5
commit 52fd512554
3 changed files with 9 additions and 3 deletions

View File

@@ -12,8 +12,9 @@ pub fn ContextMenu(
let hash = torrent_hash.clone();
let action_str = action.to_string();
on_close.call(()); // Always close menu
on_action.call((action_str, hash)); // Delegate
logging::log!("ContextMenu: Action '{}' for hash '{}'", action_str, hash);
on_action.call((action_str, hash)); // Delegate FIRST
on_close.call(()); // Close menu AFTER
};
if !visible {