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
5719c7d2
Commit
5719c7d2
authored
Apr 28, 2021
by
Demid Merzlyakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename method.
parent
fd34d71e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
1Weather/AppDelegate.swift
+1
-1
1Weather/Model/LocationManager.swift
+3
-3
1Weather/ViewModels/ForecastViewModel.swift
+1
-1
1Weather/ViewModels/TodayViewModel.swift
+1
-1
No files found.
1Weather/AppDelegate.swift
View file @
5719c7d2
...
...
@@ -69,7 +69,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
func
applicationDidBecomeActive
(
_
application
:
UIApplication
)
{
LocationManager
.
shared
.
update
AllWeather
IfNeeded
()
LocationManager
.
shared
.
update
Everything
IfNeeded
()
}
func
application
(
_
application
:
UIApplication
,
didRegisterForRemoteNotificationsWithDeviceToken
deviceToken
:
Data
)
{
...
...
1Weather/Model/LocationManager.swift
View file @
5719c7d2
...
...
@@ -53,7 +53,7 @@ public class LocationManager {
self
?
.
_locations
=
locations
self
?
.
_selectedLocationIndex
=
selectedIndex
self
?
.
handleLocationsChange
(
locationsChanged
:
true
,
selectedLocationChanged
:
true
)
self
?
.
update
AllWeather
IfNeeded
()
self
?
.
update
Everything
IfNeeded
()
}
}
...
...
@@ -185,7 +185,7 @@ public class LocationManager {
}
}
public
func
update
AllWeather
IfNeeded
()
{
public
func
update
Everything
IfNeeded
()
{
let
locations
=
self
.
locations
guard
locations
.
count
>
0
else
{
log
.
info
(
"Update all: update default location if needed."
)
...
...
@@ -365,7 +365,7 @@ public class LocationManager {
selectedLocationIndex
=
locations
.
count
-
1
}
}
update
AllWeather
IfNeeded
()
update
Everything
IfNeeded
()
}
public
func
addIfNeeded
(
partialLocation
:
PartialLocation
,
selectLocation
:
Bool
)
{
...
...
1Weather/ViewModels/ForecastViewModel.swift
View file @
5719c7d2
...
...
@@ -43,7 +43,7 @@ class ForecastViewModel: ViewModelProtocol {
}
public
func
updateWeather
()
{
locationManager
.
update
AllWeather
IfNeeded
()
locationManager
.
update
Everything
IfNeeded
()
}
public
func
selectDailyWeatherAt
(
index
:
Int
)
{
...
...
1Weather/ViewModels/TodayViewModel.swift
View file @
5719c7d2
...
...
@@ -31,7 +31,7 @@ class TodayViewModel: ViewModelProtocol {
}
public
func
updateWeather
()
{
locationManager
.
update
AllWeather
IfNeeded
()
locationManager
.
update
Everything
IfNeeded
()
}
}
...
...
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