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
943172e3
Commit
943172e3
authored
Sep 01, 2021
by
Demid Merzlyakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IOS-257: Fix the max locations count message.
parent
c1a15102
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
1Weather/UI/View controllers/Locations/LocationsViewModel.swift
+1
-1
No files found.
1Weather/UI/View controllers/Locations/LocationsViewModel.swift
View file @
943172e3
...
@@ -196,7 +196,7 @@ public class LocationsViewModel {
...
@@ -196,7 +196,7 @@ public class LocationsViewModel {
//MARK:- City CUD methods
//MARK:- City CUD methods
func
add
(
city
:
PartialLocation
)
{
func
add
(
city
:
PartialLocation
)
{
guard
locationManager
.
locations
.
count
<
locationManager
.
maxLocationsCount
else
{
guard
locationManager
.
locations
.
count
<
locationManager
.
maxLocationsCount
else
{
self
.
delegate
?
.
viewModelError
(
model
:
self
,
title
:
nil
,
message
:
"search.error.maxLocationWarning"
.
localized
(
))
self
.
delegate
?
.
viewModelError
(
model
:
self
,
title
:
nil
,
message
:
String
(
format
:
"search.error.maxLocationWarning"
.
localized
(),
"
\(
locationManager
.
maxLocationsCount
)
"
))
return
return
}
}
locationManager
.
addIfNeeded
(
partialLocation
:
city
,
selectLocation
:
true
)
{
success
in
locationManager
.
addIfNeeded
(
partialLocation
:
city
,
selectLocation
:
true
)
{
success
in
...
...
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