From 6d2096be7ed8f79e1e0017deb16c286ccda726a4 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 19 Jul 2024 14:20:51 +0300 Subject: [PATCH] update session on request value change --- .../Browser/Container/Page/Navbar/Request.php | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/Entity/Browser/Container/Page/Navbar/Request.php b/src/Entity/Browser/Container/Page/Navbar/Request.php index 38b580d..e0ecfc2 100644 --- a/src/Entity/Browser/Container/Page/Navbar/Request.php +++ b/src/Entity/Browser/Container/Page/Navbar/Request.php @@ -16,7 +16,7 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Navb $entry->get_text() ); - $this->navbar->page->container->tab->updateSession(); // @TODO async page update + $this->navbar->page->container->tab->updateSession(); } protected function _onKeyRelease( @@ -28,4 +28,24 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Navb $this->navbar->page->container->tab->updateSession(); } + + // Update setter with session update feature + public function setValue( + ?string $value = null + ): void + { + $this->gtk->set_text( + is_null($value) ? $this->_value : trim( + strval( + $value + ) + ) + ); + + // Update session on tab initiated only + if (isset($this->navbar->page->container->tab)) + { + $this->navbar->page->container->tab->updateSession(); + } + } } \ No newline at end of file