Clear data before new bar display iteration
This makes sure that data displayed is always fresh
This commit is contained in:
@@ -86,13 +86,15 @@ impl Unibar {
|
||||
for md in &mut self.bar_modules_enabled {
|
||||
let mut mod_parts = Vec::new();
|
||||
|
||||
// Each bar module implements following 3 steps:
|
||||
// Each bar module implements following 4 steps:
|
||||
// * Clear data from previous iteration
|
||||
// * Generate raw data with pertinent information
|
||||
// * Return a unicode icon to be displayed
|
||||
// * Return a String content to be displayed after the icon
|
||||
//
|
||||
// Following generates ICON+CONTENT string for a module to be displayed
|
||||
// in the bar
|
||||
md.clear();
|
||||
md.generate_data();
|
||||
mod_parts.push(md.get_icon());
|
||||
mod_parts.push(md.get_content());
|
||||
|
Reference in New Issue
Block a user