From 7311af914af05d84724b79ccf125da66ee089fdd Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 14 Oct 2024 06:01:36 +0300 Subject: [PATCH] pass uri variant to action --- .../window/tab/item/page/content/text/gemini/reader.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs b/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs index 9321819d..7d107daf 100644 --- a/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs +++ b/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs @@ -196,14 +196,13 @@ impl Reader { if let Some(iter) = gobject.iter_at_location(buffer_x, buffer_y) { for tag in iter.tags() { // Tag is link - if let Some(_) = _links_.get(&tag) { - return action_tab_open.activate(None); // @TODO implement URI option - // @TODO action does not work after focus out + if let Some(uri) = _links_.get(&tag) { + return action_tab_open.activate(Some(&uri.to_string().to_variant())); } } } } - }); + }); // for a note: this action sensitive to focus out motion_controller.connect_motion({ let gobject = widget.gobject().clone();