From 941b1cc283594bb9d6917f795a97fd5cb57ba2a2 Mon Sep 17 00:00:00 2001 From: yggverse Date: Tue, 14 Jan 2025 22:28:47 +0200 Subject: [PATCH] add comments --- src/app/browser/window/tab/item/page.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/browser/window/tab/item/page.rs b/src/app/browser/window/tab/item/page.rs index 594fd3c1..919d6df7 100644 --- a/src/app/browser/window/tab/item/page.rs +++ b/src/app/browser/window/tab/item/page.rs @@ -295,12 +295,14 @@ impl Page { }; } + /// Update `Self` witch children components pub fn update(&self) { // Update components self.navigation.update(self.progress_fraction()); // @TODO self.content.update(); } + /// Cleanup `Self` session pub fn clean( &self, transaction: &Transaction, @@ -323,6 +325,7 @@ impl Page { Ok(()) } + /// Restore `Self` session from database pub fn restore( &self, transaction: &Transaction, @@ -353,6 +356,7 @@ impl Page { Ok(()) } + /// Save `Self` session to database pub fn save( &self, transaction: &Transaction, @@ -382,6 +386,7 @@ impl Page { self.title.borrow().clone() } + /// Get value for progress bar, depending on `Self::Status` pub fn progress_fraction(&self) -> Option { // Interpret status to progress fraction match *self.status.borrow() { @@ -400,6 +405,7 @@ impl Page { } } + /// Get `Self` loading status pub fn is_loading(&self) -> bool { match self.progress_fraction() { Some(progress_fraction) => progress_fraction < 1.0,