Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
liberty
tunnel
liberty-tunnel-ios
Commits
36b4bae9
Commit
36b4bae9
authored
Mar 15, 2019
by
Jose Blaya
Browse files
- Show login view after dismiss the Walkthrough view controller.
- Hide navigation bar buttons when not logged
parent
e4aa358d
Changes
1
Hide whitespace changes
Inline
Side-by-side
PIA VPN/DashboardViewController.swift
View file @
36b4bae9
...
...
@@ -117,6 +117,8 @@ class DashboardViewController: AutolayoutViewController {
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
setupNavigationBarButtons
()
guard
AppPreferences
.
shared
.
wasLaunched
&&
!
Flags
.
shared
.
alwaysShowsWalkthrough
else
{
AppPreferences
.
shared
.
wasLaunched
=
true
showWalkthrough
()
...
...
@@ -166,6 +168,14 @@ class DashboardViewController: AutolayoutViewController {
// MARK: Actions
private
func
setupNavigationBarButtons
()
{
guard
AppPreferences
.
shared
.
wasLaunched
,
!
Flags
.
shared
.
alwaysShowsWalkthrough
,
Client
.
providers
.
accountProvider
.
isLoggedIn
else
{
navigationItem
.
leftBarButtonItem
=
nil
navigationItem
.
rightBarButtonItem
=
nil
return
}
switch
self
.
tileModeStatus
{
//change the status
case
.
normal
:
if
let
leftBarButton
=
navigationItem
.
leftBarButtonItem
,
...
...
@@ -254,8 +264,8 @@ class DashboardViewController: AutolayoutViewController {
if
let
presented
=
self
.
navigationController
?
.
presentedViewController
,
presented
!=
self
{
present
ed
.
dismiss
(
animated
:
true
,
completion
:
{
self
.
present
(
vc
,
animated
:
fals
e
,
completion
:
nil
)
self
.
present
(
vc
,
animated
:
true
,
completion
:
{
present
ed
.
dismiss
(
animated
:
tru
e
,
completion
:
nil
)
})
}
else
{
present
(
vc
,
animated
:
false
,
completion
:
nil
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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