From 6823052b52af71b966e05e12114b55e693a6f9fe Mon Sep 17 00:00:00 2001 From: yggverse Date: Tue, 27 Aug 2024 15:53:15 +0300 Subject: [PATCH] implement refresh method --- src/app/browser.cpp | 2 ++ src/app/browser/main.cpp | 7 +++++++ src/app/browser/main.hpp | 2 ++ 3 files changed, 11 insertions(+) diff --git a/src/app/browser.cpp b/src/app/browser.cpp index 9c020cd3..f54c3af8 100644 --- a/src/app/browser.cpp +++ b/src/app/browser.cpp @@ -99,6 +99,8 @@ Browser::Browser( "refresh", [this] { + browserMain->refresh(); + browserHeader->set_title( browserMain->get_current_tab_label_text() ); diff --git a/src/app/browser/main.cpp b/src/app/browser/main.cpp index 15cb937a..05b75f48 100644 --- a/src/app/browser/main.cpp +++ b/src/app/browser/main.cpp @@ -72,4 +72,11 @@ void Main::tab_close_right() void Main::tab_close_all() { mainTab->close_all(); +}; + +void Main::refresh() +{ + mainTab->refresh( + mainTab->get_current_page() + ); }; \ No newline at end of file diff --git a/src/app/browser/main.hpp b/src/app/browser/main.hpp index edd57846..3bf98461 100644 --- a/src/app/browser/main.hpp +++ b/src/app/browser/main.hpp @@ -29,6 +29,8 @@ namespace app::browser void tab_close_right(); void tab_close(); void tab_update(); + + void refresh(); }; }