rename action

This commit is contained in:
yggverse 2024-09-28 03:59:05 +03:00
parent ae2bb93ea7
commit 7587e02aff
5 changed files with 14 additions and 14 deletions

View file

@ -17,9 +17,9 @@ pub struct Gemini {
impl Gemini {
// Construct
pub fn new(gemtext: &str, base: &Uri, action_open: Arc<SimpleAction>) -> Self {
pub fn new(gemtext: &str, base: &Uri, action_page_open: Arc<SimpleAction>) -> Self {
// Init components
let reader = Reader::new(gemtext, base, action_open);
let reader = Reader::new(gemtext, base, action_page_open);
// Init widget
let widget = Viewport::builder().scroll_to_focus(false).build();

View file

@ -21,7 +21,7 @@ pub struct Reader {
impl Reader {
// Construct
pub fn new(gemtext: &str, base: &Uri, action_open: Arc<SimpleAction>) -> Self {
pub fn new(gemtext: &str, base: &Uri, action_page_open: Arc<SimpleAction>) -> Self {
// Init title
let mut title = None;
@ -91,7 +91,7 @@ impl Reader {
return match uri.scheme().as_str() {
"gemini" => {
// Open new page
action_open.activate(Some(&uri.to_str().to_variant()));
action_page_open.activate(Some(&uri.to_str().to_variant()));
// Prevent link open in external application
Propagation::Stop