Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
25d27da0
Commit
25d27da0
authored
Dec 27, 2017
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add functions.
parent
ffa849ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
AuthenticationNavigator.kt
...id/authentication/presentation/AuthenticationNavigator.kt
+14
-2
SignupPresenter.kt
...oid/authentication/signup/presentation/SignupPresenter.kt
+8
-0
No files found.
app/src/main/java/chat/rocket/android/authentication/presentation/AuthenticationNavigator.kt
View file @
25d27da0
package
chat.rocket.android.authentication.presentation
import
android.content.Context
import
android.content.Intent
import
chat.rocket.android.R
import
chat.rocket.android.app.MainActivity
import
chat.rocket.android.authentication.ui.AuthenticationActivity
import
chat.rocket.android.authentication.login.ui.LoginFragment
import
chat.rocket.android.authentication.signup.ui.SignupFragment
import
chat.rocket.android.authentication.twofactor.ui.TwoFAFragment
import
chat.rocket.android.authentication.ui.AuthenticationActivity
import
chat.rocket.android.util.addFragmentBackStack
import
chat.rocket.android.webview.webViewIntent
class
AuthenticationNavigator
(
internal
val
activity
:
AuthenticationActivity
)
{
class
AuthenticationNavigator
(
internal
val
activity
:
AuthenticationActivity
,
internal
val
context
:
Context
)
{
var
currentServer
:
String
?
=
null
fun
toLogin
(
server
:
String
)
{
...
...
@@ -33,6 +35,16 @@ class AuthenticationNavigator(internal val activity: AuthenticationActivity) {
}
}
fun
toTermsOfService
()
{
val
webPageUrl
=
currentServer
+
"/terms-of-service"
activity
.
startActivity
(
context
.
webViewIntent
(
webPageUrl
))
}
fun
toPrivacyPolicy
()
{
val
webPageUrl
=
currentServer
+
"/privacy-policy"
activity
.
startActivity
(
context
.
webViewIntent
(
webPageUrl
))
}
fun
toChatList
()
{
val
chatRoom
=
Intent
(
activity
,
MainActivity
::
class
.
java
).
apply
{
//TODO any parameter to pass
...
...
app/src/main/java/chat/rocket/android/authentication/signup/presentation/SignupPresenter.kt
View file @
25d27da0
...
...
@@ -60,4 +60,12 @@ class SignupPresenter @Inject constructor(private val view: SignupView,
}
}
}
fun
termsOfService
()
{
navigator
.
toTermsOfService
()
}
fun
privacyPolicy
()
{
navigator
.
toPrivacyPolicy
()
}
}
\ No newline at end of file
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