Skip to content

Commit 9482f84

Browse files
author
Ruslan
committed
Figured out the UI array type
1 parent 7f4e1f1 commit 9482f84

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/weather.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use chrono::{DateTime, Datelike, Timelike};
22
use serde::Deserialize;
3-
use slint::{Model, ModelRc, VecModel};
3+
use slint::VecModel;
44

55
use crate::{Api, Coordinates, Date, Time, WeatherDaily};
66

@@ -83,6 +83,7 @@ pub async fn set_weather(api: Api<'_>) {
8383
let daily = api_data.daily.clone();
8484

8585
let mut weather_daily: Vec<WeatherDaily> = vec![];
86+
8687
api_data
8788
.daily
8889
.time
@@ -134,6 +135,5 @@ pub async fn set_weather(api: Api<'_>) {
134135
});
135136
});
136137

137-
// TODO: Figure this out
138-
api.set_weather_daily(ModelRc::from(weather_daily));
138+
api.set_weather_daily(VecModel::from_slice(&weather_daily));
139139
}

0 commit comments

Comments
 (0)