Commit 36de1a29 by Demid Merzlyakov

IOS-101: add smart text mock.

parent c10cea72
...@@ -57,7 +57,7 @@ public struct MediumTemperatureWidgetView: View { ...@@ -57,7 +57,7 @@ public struct MediumTemperatureWidgetView: View {
.padding(.top, 12) .padding(.top, 12)
HStack(alignment: .top) { HStack(alignment: .top) {
Text("SmartText") Text(widgetViewModel.smartText)
.font(WidgetFont.SFProDisplay.regular(size: 12).font) .font(WidgetFont.SFProDisplay.regular(size: 12).font)
Spacer() Spacer()
......
...@@ -18,4 +18,5 @@ public protocol WidgetViewModel { ...@@ -18,4 +18,5 @@ public protocol WidgetViewModel {
var highTemperature: String { get } var highTemperature: String { get }
var lowTemperature: String { get } var lowTemperature: String { get }
var isDeviceLocation: Bool { get } var isDeviceLocation: Bool { get }
var smartText: String { get }
} }
...@@ -10,8 +10,8 @@ import UIKit ...@@ -10,8 +10,8 @@ import UIKit
@available(iOS 14, *) @available(iOS 14, *)
struct WidgetViewModelMock: WidgetViewModel { struct WidgetViewModelMock: WidgetViewModel {
private class OneWeatherUIClass {} private class OneWeatherUIClass {}
let showLastTimeUpdated = false let showLastTimeUpdated = true
let lastTimeUpdatedText = "Last update text" let lastTimeUpdatedText = "Last updated 2h ago."
let cityName = "New York" let cityName = "New York"
let temperature = "96°" let temperature = "96°"
let weatherType = "Partly Cloudy" let weatherType = "Partly Cloudy"
...@@ -19,4 +19,5 @@ struct WidgetViewModelMock: WidgetViewModel { ...@@ -19,4 +19,5 @@ struct WidgetViewModelMock: WidgetViewModel {
let highTemperature = "97°" let highTemperature = "97°"
let lowTemperature = "89°" let lowTemperature = "89°"
let isDeviceLocation = true let isDeviceLocation = true
let smartText = "Feels like 101° due to high humidity (77%)."
} }
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