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
efe58f9d
Commit
efe58f9d
authored
Jun 28, 2021
by
Shailesh Aher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unecessary unknown moon phase handling, and corrected moon phase cell visible condition
parent
119ed138
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
1Weather/UI/SharedCells/MoonPhaseCell/MoonPhaseCell.swift
+2
-0
1Weather/UI/View controllers/Today/Cells/TodayCellFactory.swift
+1
-1
CoreDataStorage/CoreDataStorage/Objects/Human/CoreCurrentWeather.swift
+1
-1
No files found.
1Weather/UI/SharedCells/MoonPhaseCell/MoonPhaseCell.swift
View file @
efe58f9d
...
@@ -147,6 +147,8 @@ class MoonPhaseCell: UITableViewCell {
...
@@ -147,6 +147,8 @@ class MoonPhaseCell: UITableViewCell {
MoonPhaseCell
.
nowDateFormatter
.
timeZone
=
today
?
.
timeZone
MoonPhaseCell
.
nowDateFormatter
.
timeZone
=
today
?
.
timeZone
moonTypeLabel
.
text
=
today
?
.
moonPhase
?
.
localized
moonTypeLabel
.
text
=
today
?
.
moonPhase
?
.
localized
moonTypeImageView
.
image
=
today
?
.
moonPhase
?
.
image
moonTypeImageView
.
image
=
today
?
.
moonPhase
?
.
image
//TODO:- Set default moon image if we don't have phase
moonImageView
.
image
=
today
?
.
moonPhase
?
.
pathImage
moonImageView
.
image
=
today
?
.
moonPhase
?
.
pathImage
guard
guard
...
...
1Weather/UI/View controllers/Today/Cells/TodayCellFactory.swift
View file @
efe58f9d
...
@@ -230,7 +230,7 @@ class TodayCellFactory: CellFactory {
...
@@ -230,7 +230,7 @@ class TodayCellFactory: CellFactory {
rowsToHide
.
insert
(
.
airQuality
)
rowsToHide
.
insert
(
.
airQuality
)
}
}
if
location
?
.
today
?
.
moonset
==
nil
&&
(
location
?
.
today
?
.
moonrise
==
nil
||
location
?
.
today
?
.
approximateMoonrise
==
nil
)
{
if
location
?
.
today
?
.
moonset
==
nil
||
(
location
?
.
today
?
.
moonrise
==
nil
&&
location
?
.
today
?
.
approximateMoonrise
==
nil
)
{
rowsToHide
.
insert
(
.
moon
)
rowsToHide
.
insert
(
.
moon
)
}
}
...
...
CoreDataStorage/CoreDataStorage/Objects/Human/CoreCurrentWeather.swift
View file @
efe58f9d
...
@@ -36,7 +36,7 @@ open class CoreCurrentWeather: _CoreCurrentWeather, CoreDataAppModelConvertable
...
@@ -36,7 +36,7 @@ open class CoreCurrentWeather: _CoreCurrentWeather, CoreDataAppModelConvertable
result
.
moonset
=
self
.
moonset
result
.
moonset
=
self
.
moonset
result
.
approximateMoonrise
=
self
.
approximateMoonrise
result
.
approximateMoonrise
=
self
.
approximateMoonrise
result
.
moonState
=
try
CoreDataUtils
.
appValueOptional
(
name
:
"moonState"
,
value
:
self
.
moonState
,
in
:
self
)
result
.
moonState
=
try
CoreDataUtils
.
appValueOptional
(
name
:
"moonState"
,
value
:
self
.
moonState
,
in
:
self
)
result
.
moonPhase
=
try
CoreDataUtils
.
appValueOptional
(
name
:
"moonPhase"
,
value
:
self
.
moonPhase
,
in
:
self
)
??
.
unknown
result
.
moonPhase
=
try
CoreDataUtils
.
appValueOptional
(
name
:
"moonPhase"
,
value
:
self
.
moonPhase
,
in
:
self
)
return
result
return
result
}
}
...
...
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