🔥 Remove before/after_prepare_..() from components
This commit is contained in:
parent
e5db7ef6ad
commit
012fac2608
1 changed files with 0 additions and 12 deletions
|
|
@ -39,24 +39,15 @@ pub trait ComponentTrait: ComponentBase + HasHandle + Send + Sync {
|
|||
true
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
fn before_prepare_component(&mut self, cx: &mut Context) {}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
fn prepare_component(&self, cx: &mut Context) -> PrepareMarkup {
|
||||
PrepareMarkup::None
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
fn after_prepare_component(&mut self, cx: &mut Context) {}
|
||||
}
|
||||
|
||||
impl<C: ComponentTrait> ComponentBase for C {
|
||||
fn render(&mut self, cx: &mut Context) -> Markup {
|
||||
if self.is_renderable(cx) {
|
||||
// Acciones antes de preparar el componente.
|
||||
self.before_prepare_component(cx);
|
||||
|
||||
// Acciones del tema antes de preparar el componente.
|
||||
cx.theme().before_prepare_component(self, cx);
|
||||
|
||||
|
|
@ -76,9 +67,6 @@ impl<C: ComponentTrait> ComponentBase for C {
|
|||
},
|
||||
};
|
||||
|
||||
// Acciones después de preparar el componente.
|
||||
self.after_prepare_component(cx);
|
||||
|
||||
// Acciones del tema después de preparar el componente.
|
||||
cx.theme().after_prepare_component(self, cx);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue