mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
rename constructors
This commit is contained in:
parent
941b1cc283
commit
edb385f903
36 changed files with 266 additions and 180 deletions
|
|
@ -31,8 +31,10 @@ pub struct Item {
|
|||
}
|
||||
|
||||
impl Item {
|
||||
// Construct
|
||||
pub fn new(
|
||||
// Constructors
|
||||
|
||||
/// Build new `Self`
|
||||
pub fn build(
|
||||
tab_view: &TabView,
|
||||
profile: &Rc<Profile>,
|
||||
(browser_action, window_action): (&Rc<BrowserAction>, &Rc<WindowAction>),
|
||||
|
|
@ -52,13 +54,13 @@ impl Item {
|
|||
|
||||
let action = Rc::new(Action::new());
|
||||
|
||||
let page = Rc::new(Page::new(
|
||||
let page = Rc::new(Page::build(
|
||||
&id,
|
||||
profile,
|
||||
(browser_action, window_action, &action),
|
||||
));
|
||||
|
||||
let widget = Rc::new(Widget::new(
|
||||
let widget = Rc::new(Widget::build(
|
||||
id.as_str(),
|
||||
tab_view,
|
||||
&page.widget.g_box,
|
||||
|
|
@ -166,7 +168,7 @@ impl Item {
|
|||
Ok(records) => {
|
||||
for record in records {
|
||||
// Construct new item object
|
||||
let item = Rc::new(Item::new(
|
||||
let item = Rc::new(Item::build(
|
||||
tab_view,
|
||||
profile,
|
||||
// Actions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue