Resolve the duplicate widget insertion warning
This commit is contained in:
parent
a5d51dab70
commit
0032f16422
|
@ -84,24 +84,24 @@ impl DaySummary {
|
|||
|
||||
let row = gtk::Box::builder().build();
|
||||
|
||||
let label = gtk::Label::builder()
|
||||
let weight_label = gtk::Label::builder()
|
||||
.halign(gtk::Align::Start)
|
||||
.css_classes(["day-summary__weight"])
|
||||
.build();
|
||||
if let Some(w) = view_model.weight() {
|
||||
label.set_label(&w.to_string())
|
||||
weight_label.set_label(&w.to_string())
|
||||
}
|
||||
|
||||
let label = gtk::Label::builder()
|
||||
let steps_label = gtk::Label::builder()
|
||||
.halign(gtk::Align::Start)
|
||||
.css_classes(["day-summary__steps"])
|
||||
.build();
|
||||
if let Some(s) = view_model.steps() {
|
||||
label.set_label(&format!("{} steps", s));
|
||||
steps_label.set_label(&format!("{} steps", s));
|
||||
}
|
||||
|
||||
row.append(&label);
|
||||
row.append(&label);
|
||||
row.append(&weight_label);
|
||||
row.append(&steps_label);
|
||||
self.append(&row);
|
||||
|
||||
for activity in TIME_DISTANCE_ACTIVITIES {
|
||||
|
|
|
@ -145,7 +145,6 @@ impl HistoricalView {
|
|||
let mut days = interval.days().map(Date::new).collect::<Vec<Date>>();
|
||||
days.reverse();
|
||||
model.extend(days.into_iter());
|
||||
// model.extend(interval.days().map(Date::new));
|
||||
self.imp()
|
||||
.list_view
|
||||
.set_model(Some(>k::NoSelection::new(Some(model))));
|
||||
|
|
Loading…
Reference in New Issue