Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
L
liberty-tunnel-client-library-apple
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liberty
tunnel
liberty-tunnel-client-library-apple
Commits
9f9facb8
Commit
9f9facb8
authored
Nov 10, 2020
by
Jose Blaya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor
parent
0a668e29
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
30 deletions
+6
-30
PIALibrary/Sources/Core/WebServices/Server.swift
PIALibrary/Sources/Core/WebServices/Server.swift
+1
-1
PIALibrary/Sources/Library/Client.swift
PIALibrary/Sources/Library/Client.swift
+4
-0
PIALibrary/Sources/Library/WebServices/GlossServersBundle.swift
...rary/Sources/Library/WebServices/GlossServersBundle.swift
+0
-27
PIALibrary/Sources/UI/iOS/ViewControllers/PIAWelcomeViewController.swift
...ces/UI/iOS/ViewControllers/PIAWelcomeViewController.swift
+1
-2
No files found.
PIALibrary/Sources/Core/WebServices/Server.swift
View file @
9f9facb8
...
...
@@ -203,7 +203,7 @@ public class Server: Hashable {
self
.
dipToken
=
dipToken
self
.
dipStatus
=
dipStatus
isAutomatic
=
tru
e
isAutomatic
=
fals
e
}
// MARK: Hashable
...
...
PIALibrary/Sources/Library/Client.swift
View file @
9f9facb8
...
...
@@ -88,6 +88,10 @@ public final class Client {
ServersDaemon
.
shared
.
forceUpdates
(
completionBlock
:
completionBlock
)
}
public
static
func
resetWebServices
()
{
Client
.
webServices
=
PIAWebServices
()
}
/**
Refresh the list of plan products
*/
...
...
PIALibrary/Sources/Library/WebServices/GlossServersBundle.swift
View file @
9f9facb8
...
...
@@ -251,31 +251,4 @@ class GlossServersBundle: GlossParser {
}
func
parseLegacyData
(
_
json
:
JSON
)
{
let
glossConfiguration
:
GlossServersBundle
.
Configuration
?
=
"info"
<~~
json
var
servers
:
[
Server
]
=
[]
for
(
code
,
serverDict
)
in
json
{
guard
let
serverJSON
=
serverDict
as?
JSON
else
{
continue
}
guard
let
_
=
serverJSON
[
"country"
]
as?
String
else
{
continue
}
guard
let
server
=
GlossServer
(
json
:
serverJSON
)?
.
parsed
else
{
continue
}
server
.
isAutomatic
=
glossConfiguration
?
.
parsed
.
automaticIdentifiers
?
.
contains
(
code
)
??
true
servers
.
append
(
server
)
}
servers
.
sort
{
$0
.
name
<
$1
.
name
}
parsed
=
ServersBundle
(
servers
:
servers
,
configuration
:
glossConfiguration
?
.
parsed
)
}
}
PIALibrary/Sources/UI/iOS/ViewControllers/PIAWelcomeViewController.swift
View file @
9f9facb8
...
...
@@ -126,11 +126,10 @@ public class PIAWelcomeViewController: AutolayoutViewController, WelcomeCompleti
@IBAction
private
func
toggleEnvironment
(
_
sender
:
Any
?)
{
if
(
Client
.
environment
==
.
production
)
{
Client
.
environment
=
.
staging
Client
.
webServices
=
PIAWebServices
()
}
else
{
Client
.
environment
=
.
production
Client
.
webServices
=
PIAWebServices
()
}
Client
.
resetWebServices
()
refreshEnvironmentButton
()
}
...
...
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