Commit 3b591898 by Dmitriy Stepanets

iOS-65 Fixed hourly card updating on location change issue

parent f7d5fc31
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<key>OneWeatherNotificationServiceExtension.xcscheme_^#shared#^_</key> <key>OneWeatherNotificationServiceExtension.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>37</integer> <integer>38</integer>
</dict> </dict>
<key>PG (Playground) 1.xcscheme</key> <key>PG (Playground) 1.xcscheme</key>
<dict> <dict>
......
...@@ -127,6 +127,7 @@ class ForecastPeriodButton: UIControl, PeriodButtonProtocol { ...@@ -127,6 +127,7 @@ class ForecastPeriodButton: UIControl, PeriodButtonProtocol {
self.tempLabel.text = hourlyWeather.temp?.settingsConverted.shortString self.tempLabel.text = hourlyWeather.temp?.settingsConverted.shortString
self.minTempLabel.text = nil self.minTempLabel.text = nil
self.indicatorImageView.image = nil self.indicatorImageView.image = nil
self.forecastImageView.image = hourlyWeather.type.image(isDay: hourlyWeather.isDay)
if Calendar.isNow(fromDate: hourlyWeather.date, timeZone: hourlyWeather.timeZone) { if Calendar.isNow(fromDate: hourlyWeather.date, timeZone: hourlyWeather.timeZone) {
self.timeLabel.text = "day.now".localized().uppercased() self.timeLabel.text = "day.now".localized().uppercased()
} }
......
...@@ -43,10 +43,8 @@ class ForecastHourlyCell: UITableViewCell { ...@@ -43,10 +43,8 @@ class ForecastHourlyCell: UITableViewCell {
//Public //Public
public func configure(hourly:[HourlyWeather]) { public func configure(hourly:[HourlyWeather]) {
self.forecastTimePeriodView.set(daily: nil, hourly: hourly) self.forecastTimePeriodView.set(daily: nil, hourly: hourly)
if self.forecastTimePeriodView.isEmpty {
self.forecastTimePeriodView.set(forecastType: .hourly, buttonType: ForecastPeriodButton.self) self.forecastTimePeriodView.set(forecastType: .hourly, buttonType: ForecastPeriodButton.self)
} }
}
} }
//MARK:- Prepare //MARK:- Prepare
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment