Commit 3b591898 by Dmitriy Stepanets

iOS-65 Fixed hourly card updating on location change issue

parent f7d5fc31
......@@ -12,7 +12,7 @@
<key>OneWeatherNotificationServiceExtension.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>37</integer>
<integer>38</integer>
</dict>
<key>PG (Playground) 1.xcscheme</key>
<dict>
......
......@@ -127,6 +127,7 @@ class ForecastPeriodButton: UIControl, PeriodButtonProtocol {
self.tempLabel.text = hourlyWeather.temp?.settingsConverted.shortString
self.minTempLabel.text = nil
self.indicatorImageView.image = nil
self.forecastImageView.image = hourlyWeather.type.image(isDay: hourlyWeather.isDay)
if Calendar.isNow(fromDate: hourlyWeather.date, timeZone: hourlyWeather.timeZone) {
self.timeLabel.text = "day.now".localized().uppercased()
}
......
......@@ -43,9 +43,7 @@ class ForecastHourlyCell: UITableViewCell {
//Public
public func configure(hourly:[HourlyWeather]) {
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)
}
}
......
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