Commit 8127853f authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Setup connection info.

parent 29bf3174
...@@ -76,9 +76,8 @@ class OnBoardingPresenter @Inject constructor( ...@@ -76,9 +76,8 @@ class OnBoardingPresenter @Inject constructor(
view.showLoading() view.showLoading()
try { try {
withContext(DefaultDispatcher) { withContext(DefaultDispatcher) {
refreshSettingsInteractor.refresh(serverUrl)
setupConnectionInfo(serverUrl) setupConnectionInfo(serverUrl)
refreshSettingsInteractor.refresh(serverUrl)
// preparing next fragment before showing it // preparing next fragment before showing it
checkEnabledAccounts(serverUrl) checkEnabledAccounts(serverUrl)
......
...@@ -95,8 +95,6 @@ class ServerPresenter @Inject constructor( ...@@ -95,8 +95,6 @@ class ServerPresenter @Inject constructor(
withContext(DefaultDispatcher) { withContext(DefaultDispatcher) {
refreshSettingsInteractor.refresh(serverUrl) refreshSettingsInteractor.refresh(serverUrl)
setupConnectionInfo(serverUrl)
// preparing next fragment before showing it // preparing next fragment before showing it
checkEnabledAccounts(serverUrl) checkEnabledAccounts(serverUrl)
checkIfLoginFormIsEnabled() checkIfLoginFormIsEnabled()
......
...@@ -82,6 +82,31 @@ abstract class CheckServerPresenter constructor( ...@@ -82,6 +82,31 @@ abstract class CheckServerPresenter constructor(
settings = it settings = it
} }
client = factory.create(serverUrl) client = factory.create(serverUrl)
state = ""
facebookOauthUrl = null
githubOauthUrl = null
googleOauthUrl = null
linkedinOauthUrl = null
gitlabOauthUrl = null
wordpressOauthUrl = null
casLoginUrl = null
casToken = null
casServiceName = null
casServiceNameTextColor = 0
casServiceButtonColor = 0
customOauthUrl = null
customOauthServiceName = null
customOauthServiceNameTextColor = 0
customOauthServiceButtonColor= 0
samlUrl = null
samlToken = null
samlServiceName = null
samlServiceNameTextColor = 0
samlServiceButtonColor = 0
totalSocialAccountsEnabled = 0
isLoginFormEnabled = false
isNewAccountCreationEnabled = false
} }
internal fun checkServerInfo(serverUrl: String): Job { internal fun checkServerInfo(serverUrl: String): Job {
...@@ -263,6 +288,7 @@ abstract class CheckServerPresenter constructor( ...@@ -263,6 +288,7 @@ abstract class CheckServerPresenter constructor(
val serviceNameTextColor = val serviceNameTextColor =
getServiceNameColor(serviceMap) getServiceNameColor(serviceMap)
val serviceButtonColor = getServiceButtonColor(serviceMap) val serviceButtonColor = getServiceButtonColor(serviceMap)
if (customOauthServiceName != null && if (customOauthServiceName != null &&
host != null && host != null &&
authorizePath != null && authorizePath != null &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment