Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
1
1weather
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
1weather
Commits
36de1a29
Commit
36de1a29
authored
Jul 06, 2021
by
Demid Merzlyakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IOS-101: add smart text mock.
parent
c10cea72
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
OneWeatherUI/OneWeatherUI/Widgets/MediumTemperatureWidgetView.swift
+1
-1
OneWeatherUI/OneWeatherUI/Widgets/WidgetViewModel.swift
+1
-0
OneWeatherUI/OneWeatherUI/Widgets/WidgetViewModelMock.swift
+3
-2
No files found.
OneWeatherUI/OneWeatherUI/Widgets/MediumTemperatureWidgetView.swift
View file @
36de1a29
...
@@ -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
()
...
...
OneWeatherUI/OneWeatherUI/Widgets/WidgetViewModel.swift
View file @
36de1a29
...
@@ -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
}
}
}
OneWeatherUI/OneWeatherUI/Widgets/WidgetViewModelMock.swift
View file @
36de1a29
...
@@ -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
=
fals
e
let
showLastTimeUpdated
=
tru
e
let
lastTimeUpdatedText
=
"Last update
text
"
let
lastTimeUpdatedText
=
"Last update
d 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%)."
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment