Adding thunderstorms icon.
This commit is contained in:
parent
a1add6d2f2
commit
6947fdec04
@ -9,6 +9,7 @@ pub enum Icons {
|
|||||||
Snow,
|
Snow,
|
||||||
Clear,
|
Clear,
|
||||||
Cloudy,
|
Cloudy,
|
||||||
|
Thunderstorms,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Icons {
|
impl Icons {
|
||||||
@ -24,6 +25,7 @@ impl Icons {
|
|||||||
Icons::Snow => Self::get_icon("f0f36").unwrap().to_string(),
|
Icons::Snow => Self::get_icon("f0f36").unwrap().to_string(),
|
||||||
Icons::Clear => Self::get_icon("e30d").unwrap().to_string(),
|
Icons::Clear => Self::get_icon("e30d").unwrap().to_string(),
|
||||||
Icons::Cloudy => Self::get_icon("e312").unwrap().to_string(),
|
Icons::Cloudy => Self::get_icon("e312").unwrap().to_string(),
|
||||||
|
Icons::Thunderstorms => Self::get_icon("e338").unwrap().to_string(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -77,6 +77,7 @@ pub fn detect_icon(short_forecast: &str) -> Option<String> {
|
|||||||
_ if short_forecast.contains("Rain") && short_forecast.contains("Snow") => {
|
_ if short_forecast.contains("Rain") && short_forecast.contains("Snow") => {
|
||||||
Some(Icons::Mixed.get_icon_str())
|
Some(Icons::Mixed.get_icon_str())
|
||||||
}
|
}
|
||||||
|
_ if short_forecast.contains("Thunderstorms") => Some(Icons::Thunderstorms.get_icon_str()),
|
||||||
_ if short_forecast.contains("Snow") => Some(Icons::Snow.get_icon_str()),
|
_ if short_forecast.contains("Snow") => Some(Icons::Snow.get_icon_str()),
|
||||||
_ if short_forecast.contains("Rain") => Some(Icons::Rain.get_icon_str()),
|
_ if short_forecast.contains("Rain") => Some(Icons::Rain.get_icon_str()),
|
||||||
_ if short_forecast.contains("Cloudy") => Some(Icons::Cloudy.get_icon_str()),
|
_ if short_forecast.contains("Cloudy") => Some(Icons::Cloudy.get_icon_str()),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user