mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 09:10:08 +00:00
remove extra getters
This commit is contained in:
parent
e27f977bcd
commit
2e8ee31cb0
@ -229,7 +229,7 @@ impl Tab {
|
|||||||
if !item.page.is_loading() {
|
if !item.page.is_loading() {
|
||||||
item.widget
|
item.widget
|
||||||
.gobject
|
.gobject
|
||||||
.set_title(item.page.meta.title().as_str())
|
.set_title(&item.page.meta.title.borrow())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Update all tabs
|
// Update all tabs
|
||||||
@ -242,7 +242,7 @@ impl Tab {
|
|||||||
if !item.page.is_loading() {
|
if !item.page.is_loading() {
|
||||||
item.widget
|
item.widget
|
||||||
.gobject
|
.gobject
|
||||||
.set_title(item.page.meta.title().as_str())
|
.set_title(&item.page.meta.title.borrow())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -350,7 +350,7 @@ impl Page {
|
|||||||
|
|
||||||
pub fn progress_fraction(&self) -> Option<f64> {
|
pub fn progress_fraction(&self) -> Option<f64> {
|
||||||
// Interpret status to progress fraction
|
// Interpret status to progress fraction
|
||||||
match self.meta.status() {
|
match *self.meta.status.borrow() {
|
||||||
Status::Reload | Status::SessionRestore => Some(0.0),
|
Status::Reload | Status::SessionRestore => Some(0.0),
|
||||||
Status::Resolving => Some(0.1),
|
Status::Resolving => Some(0.1),
|
||||||
Status::Resolved => Some(0.2),
|
Status::Resolved => Some(0.2),
|
||||||
|
@ -74,14 +74,6 @@ impl Meta {
|
|||||||
|
|
||||||
// Getters
|
// Getters
|
||||||
|
|
||||||
pub fn status(&self) -> Status {
|
|
||||||
self.status.borrow().clone()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn title(&self) -> GString {
|
|
||||||
self.title.borrow().clone()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn redirects(&self) -> usize {
|
pub fn redirects(&self) -> usize {
|
||||||
self.redirect.borrow().len() + 1
|
self.redirect.borrow().len() + 1
|
||||||
}
|
}
|
||||||
@ -149,7 +141,7 @@ impl Meta {
|
|||||||
app_browser_window_tab_page_id: &i64,
|
app_browser_window_tab_page_id: &i64,
|
||||||
) -> Result<(), String> {
|
) -> Result<(), String> {
|
||||||
// Keep value in memory until operation complete
|
// Keep value in memory until operation complete
|
||||||
let title = self.title();
|
let title = self.title.borrow();
|
||||||
|
|
||||||
match database::insert(
|
match database::insert(
|
||||||
transaction,
|
transaction,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user