diff --git a/src/icons.rs b/src/icons.rs index b9fe34a..6a7e39d 100644 --- a/src/icons.rs +++ b/src/icons.rs @@ -9,6 +9,7 @@ pub enum Icons { Snow, Clear, Cloudy, + Thunderstorms, } impl Icons { @@ -24,6 +25,7 @@ impl Icons { Icons::Snow => Self::get_icon("f0f36").unwrap().to_string(), Icons::Clear => Self::get_icon("e30d").unwrap().to_string(), Icons::Cloudy => Self::get_icon("e312").unwrap().to_string(), + Icons::Thunderstorms => Self::get_icon("e338").unwrap().to_string(), } } diff --git a/src/weather.rs b/src/weather.rs index bcb47c2..34acee8 100644 --- a/src/weather.rs +++ b/src/weather.rs @@ -77,6 +77,7 @@ pub fn detect_icon(short_forecast: &str) -> Option { _ if short_forecast.contains("Rain") && short_forecast.contains("Snow") => { 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("Rain") => Some(Icons::Rain.get_icon_str()), _ if short_forecast.contains("Cloudy") => Some(Icons::Cloudy.get_icon_str()),