Adding thunderstorms icon.

This commit is contained in:
calcu1on 2025-04-15 12:29:55 -04:00
parent a1add6d2f2
commit 6947fdec04
2 changed files with 3 additions and 0 deletions

View File

@ -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(),
} }
} }

View File

@ -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()),