From dfe340584c5c66dcc66b4c424007f05cbdc4e7b5 Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Tue, 18 Jun 2024 22:29:09 +0300 Subject: [PATCH] fix version badge --- src/content/mod.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/content/mod.rs b/src/content/mod.rs index 5fdba76..963e372 100644 --- a/src/content/mod.rs +++ b/src/content/mod.rs @@ -439,11 +439,8 @@ fn create_kernel_badges(badge_box: >k::Box, running_kernel_info: &RunningKerne let kernel_badges_size_group0 = gtk::SizeGroup::new(SizeGroupMode::Both); let kernel_badges_size_group1 = gtk::SizeGroup::new(SizeGroupMode::Both); - //let json: serde_json::Value = serde_json::from_str(&selected_kernel_branch_clone.db).expect("Unable to parse"); - //let kernel_version = json["latest_version"].as_str().expect("invalid json"); - - println!("sex: {}", &selected_kernel_branch_clone.db); - let kernel_version = "myass"; + let json: serde_json::Value = serde_json::from_str(&selected_kernel_branch_clone.db).expect("Unable to parse"); + let kernel_version = json["latest_version"].as_str().expect("invalid json"); let version_css_style = if &running_kernel_info.version == &kernel_version { "background-green-bg"