mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
change meta update on page reload
This commit is contained in:
parent
696fafe3f9
commit
f939e427b8
2 changed files with 32 additions and 20 deletions
|
|
@ -21,12 +21,17 @@ impl Title {
|
|||
|
||||
// Actions
|
||||
pub fn update(&self, text: Option<GString>) {
|
||||
match text {
|
||||
Some(value) => self
|
||||
.widget
|
||||
.set_text(&format!("{} - {}", value, DEFAULT_TEXT)),
|
||||
None => self.widget.set_text(DEFAULT_TEXT),
|
||||
};
|
||||
let mut name = Vec::new();
|
||||
|
||||
if let Some(value) = text {
|
||||
if !value.is_empty() {
|
||||
name.push(value);
|
||||
}
|
||||
}
|
||||
|
||||
name.push(GString::from(DEFAULT_TEXT));
|
||||
|
||||
self.widget.set_text(&name.join(" - "));
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue