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
9ba67a56
Commit
9ba67a56
authored
May 22, 2018
by
aniket
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set of changes #1
parent
f4c434e2
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
274 additions
and
196 deletions
+274
-196
LoginPresenter.kt
...droid/authentication/login/presentation/LoginPresenter.kt
+32
-8
LoginFragment.kt
...t/rocket/android/authentication/login/ui/LoginFragment.kt
+131
-115
SignupPresenter.kt
...oid/authentication/signup/presentation/SignupPresenter.kt
+14
-12
SignupView.kt
.../android/authentication/signup/presentation/SignupView.kt
+1
-1
SignupFragment.kt
...rocket/android/authentication/signup/ui/SignupFragment.kt
+40
-23
AuthenticationActivity.kt
...ocket/android/authentication/ui/AuthenticationActivity.kt
+5
-3
MainActivity.kt
...src/main/java/chat/rocket/android/main/ui/MainActivity.kt
+51
-34
No files found.
app/src/main/java/chat/rocket/android/authentication/login/presentation/LoginPresenter.kt
View file @
9ba67a56
...
...
@@ -151,13 +151,20 @@ class LoginPresenter @Inject constructor(
client
.
settingsOauth
().
services
}
if
(
services
.
isNotEmpty
())
{
val
state
=
"{\"loginStyle\":\"popup\",\"credentialToken\":\"${generateRandomString(40)}\",\"isCordova\":true}"
.
encodeToBase64
()
val
state
=
"{\"loginStyle\":\"popup\",\"credentialToken\":\"${generateRandomString(40)}\",\"isCordova\":true}"
.
encodeToBase64
()
var
totalSocialAccountsEnabled
=
0
if
(
settings
.
isFacebookAuthenticationEnabled
())
{
val
clientId
=
getOauthClientId
(
services
,
SERVICE_NAME_FACEBOOK
)
if
(
clientId
!=
null
)
{
view
.
setupFacebookButtonListener
(
OauthHelper
.
getFacebookOauthUrl
(
clientId
,
currentServer
,
state
),
state
)
view
.
setupFacebookButtonListener
(
OauthHelper
.
getFacebookOauthUrl
(
clientId
,
currentServer
,
state
),
state
)
view
.
enableLoginByFacebook
()
totalSocialAccountsEnabled
++
}
...
...
@@ -165,7 +172,12 @@ class LoginPresenter @Inject constructor(
if
(
settings
.
isGithubAuthenticationEnabled
())
{
val
clientId
=
getOauthClientId
(
services
,
SERVICE_NAME_GITHUB
)
if
(
clientId
!=
null
)
{
view
.
setupGithubButtonListener
(
OauthHelper
.
getGithubOauthUrl
(
clientId
,
state
),
state
)
view
.
setupGithubButtonListener
(
OauthHelper
.
getGithubOauthUrl
(
clientId
,
state
),
state
)
view
.
enableLoginByGithub
()
totalSocialAccountsEnabled
++
}
...
...
@@ -173,7 +185,13 @@ class LoginPresenter @Inject constructor(
if
(
settings
.
isGoogleAuthenticationEnabled
())
{
val
clientId
=
getOauthClientId
(
services
,
SERVICE_NAME_GOOGLE
)
if
(
clientId
!=
null
)
{
view
.
setupGoogleButtonListener
(
OauthHelper
.
getGoogleOauthUrl
(
clientId
,
currentServer
,
state
),
state
)
view
.
setupGoogleButtonListener
(
OauthHelper
.
getGoogleOauthUrl
(
clientId
,
currentServer
,
state
),
state
)
view
.
enableLoginByGoogle
()
totalSocialAccountsEnabled
++
}
...
...
@@ -181,7 +199,13 @@ class LoginPresenter @Inject constructor(
if
(
settings
.
isLinkedinAuthenticationEnabled
())
{
val
clientId
=
getOauthClientId
(
services
,
SERVICE_NAME_LINKEDIN
)
if
(
clientId
!=
null
)
{
view
.
setupLinkedinButtonListener
(
OauthHelper
.
getLinkedinOauthUrl
(
clientId
,
currentServer
,
state
),
state
)
view
.
setupLinkedinButtonListener
(
OauthHelper
.
getLinkedinOauthUrl
(
clientId
,
currentServer
,
state
),
state
)
view
.
enableLoginByLinkedin
()
totalSocialAccountsEnabled
++
}
...
...
@@ -307,8 +331,8 @@ class LoginPresenter @Inject constructor(
registerPushToken
()
if
(
loginType
==
TYPE_LOGIN_USER_EMAIL
)
{
loginCredentials
=
Credential
.
Builder
(
usernameOrEmail
)
.
setPassword
(
password
)
.
build
()
.
setPassword
(
password
)
.
build
()
view
.
saveSmartLockCredentials
(
loginCredentials
)
}
navigator
.
toChatList
()
...
...
@@ -341,7 +365,7 @@ class LoginPresenter @Inject constructor(
}.
toString
()
}
private
fun
getCustomOauthServices
(
listMap
:
List
<
Map
<
String
,
Any
>>):
List
<
Map
<
String
,
Any
>>
{
private
fun
getCustomOauthServices
(
listMap
:
List
<
Map
<
String
,
Any
>>):
List
<
Map
<
String
,
Any
>>
{
return
listMap
.
filter
{
map
->
map
[
"custom"
]
==
true
}
}
...
...
app/src/main/java/chat/rocket/android/authentication/login/ui/LoginFragment.kt
View file @
9ba67a56
This diff is collapsed.
Click to expand it.
app/src/main/java/chat/rocket/android/authentication/signup/presentation/SignupPresenter.kt
View file @
9ba67a56
...
...
@@ -23,15 +23,17 @@ import chat.rocket.core.model.Myself
import
com.google.android.gms.auth.api.credentials.Credential
import
javax.inject.Inject
class
SignupPresenter
@Inject
constructor
(
private
val
view
:
SignupView
,
private
val
strategy
:
CancelStrategy
,
private
val
navigator
:
AuthenticationNavigator
,
private
val
localRepository
:
LocalRepository
,
private
val
serverInteractor
:
GetCurrentServerInteractor
,
private
val
factory
:
RocketChatClientFactory
,
private
val
saveAccountInteractor
:
SaveAccountInteractor
,
private
val
getAccountsInteractor
:
GetAccountsInteractor
,
settingsInteractor
:
GetSettingsInteractor
)
{
class
SignupPresenter
@Inject
constructor
(
private
val
view
:
SignupView
,
private
val
strategy
:
CancelStrategy
,
private
val
navigator
:
AuthenticationNavigator
,
private
val
localRepository
:
LocalRepository
,
private
val
serverInteractor
:
GetCurrentServerInteractor
,
private
val
factory
:
RocketChatClientFactory
,
private
val
saveAccountInteractor
:
SaveAccountInteractor
,
private
val
getAccountsInteractor
:
GetAccountsInteractor
,
settingsInteractor
:
GetSettingsInteractor
)
{
private
val
currentServer
=
serverInteractor
.
get
()
!!
private
val
client
:
RocketChatClient
=
factory
.
create
(
currentServer
)
private
var
settings
:
PublicSettings
=
settingsInteractor
.
get
(
serverInteractor
.
get
()
!!
)
...
...
@@ -67,9 +69,9 @@ class SignupPresenter @Inject constructor(private val view: SignupView,
localRepository
.
save
(
LocalRepository
.
CURRENT_USERNAME_KEY
,
me
.
username
)
saveAccount
(
me
)
registerPushToken
()
va
r
loginCredentials
:
Credential
=
Credential
.
Builder
(
email
)
.
setPassword
(
password
)
.
build
()
va
l
loginCredentials
=
Credential
.
Builder
(
email
)
.
setPassword
(
password
)
.
build
()
view
.
saveSmartLockCredentials
(
loginCredentials
)
navigator
.
toChatList
()
}
catch
(
exception
:
RocketChatException
)
{
...
...
app/src/main/java/chat/rocket/android/authentication/signup/presentation/SignupView.kt
View file @
9ba67a56
...
...
@@ -29,5 +29,5 @@ interface SignupView : LoadingView, MessageView {
/**
* Save credentials via google smart lock
*/
fun
saveSmartLockCredentials
(
loginCredential
:
Credential
?
)
fun
saveSmartLockCredentials
(
loginCredential
:
Credential
)
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/authentication/signup/ui/SignupFragment.kt
View file @
9ba67a56
...
...
@@ -7,7 +7,6 @@ import android.os.Build
import
android.os.Bundle
import
android.support.v4.app.Fragment
import
android.text.style.ClickableSpan
import
android.util.Log
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
...
...
@@ -26,6 +25,7 @@ import com.google.android.gms.common.api.ResolvingResultCallbacks
import
com.google.android.gms.common.api.Status
import
dagger.android.support.AndroidSupportInjection
import
kotlinx.android.synthetic.main.fragment_authentication_sign_up.*
import
timber.log.Timber
import
javax.inject.Inject
internal
const
val
SAVE_CREDENTIALS
=
1
...
...
@@ -34,7 +34,7 @@ class SignupFragment : Fragment(), SignupView {
@Inject
lateinit
var
presenter
:
SignupPresenter
private
var
credentialsToBeSaved
:
Credential
?
=
nul
l
private
lateinit
var
credentialsToBeSaved
:
Credentia
l
private
val
layoutListener
=
ViewTreeObserver
.
OnGlobalLayoutListener
{
if
(
KeyboardHelper
.
isSoftKeyboardShown
(
relative_layout
.
rootView
))
{
bottom_container
.
setVisible
(
false
)
...
...
@@ -56,7 +56,11 @@ class SignupFragment : Fragment(), SignupView {
AndroidSupportInjection
.
inject
(
this
)
}
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?):
View
?
=
inflater
.
inflate
(
R
.
layout
.
fragment_authentication_sign_up
,
container
,
false
)
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?
):
View
?
=
inflater
.
inflate
(
R
.
layout
.
fragment_authentication_sign_up
,
container
,
false
)
override
fun
onViewCreated
(
view
:
View
,
savedInstanceState
:
Bundle
?)
{
super
.
onViewCreated
(
view
,
savedInstanceState
)
...
...
@@ -70,7 +74,12 @@ class SignupFragment : Fragment(), SignupView {
setUpNewUserAgreementListener
()
button_sign_up
.
setOnClickListener
{
presenter
.
signup
(
text_username
.
textContent
,
text_username
.
textContent
,
text_password
.
textContent
,
text_email
.
textContent
)
presenter
.
signup
(
text_username
.
textContent
,
text_username
.
textContent
,
text_password
.
textContent
,
text_email
.
textContent
)
}
}
...
...
@@ -111,7 +120,7 @@ class SignupFragment : Fragment(), SignupView {
}
}
override
fun
saveSmartLockCredentials
(
loginCredential
:
Credential
?
)
{
override
fun
saveSmartLockCredentials
(
loginCredential
:
Credential
)
{
credentialsToBeSaved
=
loginCredential
if
(
googleApiClient
!!
.
isConnected
)
{
saveCredentials
()
...
...
@@ -123,27 +132,22 @@ class SignupFragment : Fragment(), SignupView {
if
(
resultCode
==
RESULT_OK
)
{
Toast
.
makeText
(
context
,
"Credentials saved successfully"
,
Toast
.
LENGTH_SHORT
).
show
()
}
else
{
Log
.
e
(
"STATUS"
,
"ERROR: Cancelled by user"
)
Timber
.
e
(
"ERROR: Cancelled by user"
)
}
}
}
private
fun
saveCredentials
()
{
if
(
credentialsToBeSaved
==
null
)
{
return
}
Auth
.
CredentialsApi
.
save
(
googleApiClient
,
credentialsToBeSaved
).
setResultCallback
(
object
:
ResolvingResultCallbacks
<
Status
>(
activity
!!
,
SAVE_CREDENTIALS
)
{
override
fun
onSuccess
(
status
:
Status
)
{
Log
.
d
(
"STATUS"
,
"save:SUCCESS:$status"
)
credentialsToBeSaved
=
null
}
object
:
ResolvingResultCallbacks
<
Status
>(
activity
!!
,
SAVE_CREDENTIALS
)
{
override
fun
onSuccess
(
status
:
Status
)
{
Timber
.
d
(
"save:SUCCESS:$status"
)
}
override
fun
onUnresolvableFailure
(
status
:
Status
)
{
Log
.
w
(
"STATUS"
,
"save:FAILURE:$status"
)
credentialsToBeSaved
=
null
}
})
override
fun
onUnresolvableFailure
(
status
:
Status
)
{
Timber
.
w
(
"save:FAILURE:$status"
)
}
})
}
override
fun
showLoading
()
{
...
...
@@ -178,7 +182,8 @@ class SignupFragment : Fragment(), SignupView {
private
fun
tintEditTextDrawableStart
()
{
ui
{
val
personDrawable
=
DrawableHelper
.
getDrawableFromId
(
R
.
drawable
.
ic_person_black_24dp
,
it
)
val
personDrawable
=
DrawableHelper
.
getDrawableFromId
(
R
.
drawable
.
ic_person_black_24dp
,
it
)
val
atDrawable
=
DrawableHelper
.
getDrawableFromId
(
R
.
drawable
.
ic_at_black_24dp
,
it
)
val
lockDrawable
=
DrawableHelper
.
getDrawableFromId
(
R
.
drawable
.
ic_lock_black_24dp
,
it
)
val
emailDrawable
=
DrawableHelper
.
getDrawableFromId
(
R
.
drawable
.
ic_email_black_24dp
,
it
)
...
...
@@ -186,14 +191,22 @@ class SignupFragment : Fragment(), SignupView {
val
drawables
=
arrayOf
(
personDrawable
,
atDrawable
,
lockDrawable
,
emailDrawable
)
DrawableHelper
.
wrapDrawables
(
drawables
)
DrawableHelper
.
tintDrawables
(
drawables
,
it
,
R
.
color
.
colorDrawableTintGrey
)
DrawableHelper
.
compoundDrawables
(
arrayOf
(
text_name
,
text_username
,
text_password
,
text_email
),
drawables
)
DrawableHelper
.
compoundDrawables
(
arrayOf
(
text_name
,
text_username
,
text_password
,
text_email
),
drawables
)
}
}
private
fun
setUpNewUserAgreementListener
()
{
val
termsOfService
=
getString
(
R
.
string
.
action_terms_of_service
)
val
privacyPolicy
=
getString
(
R
.
string
.
action_privacy_policy
)
val
newUserAgreement
=
String
.
format
(
getString
(
R
.
string
.
msg_new_user_agreement
),
termsOfService
,
privacyPolicy
)
val
newUserAgreement
=
String
.
format
(
getString
(
R
.
string
.
msg_new_user_agreement
),
termsOfService
,
privacyPolicy
)
text_new_user_agreement
.
text
=
newUserAgreement
...
...
@@ -209,7 +222,11 @@ class SignupFragment : Fragment(), SignupView {
}
}
TextHelper
.
addLink
(
text_new_user_agreement
,
arrayOf
(
termsOfService
,
privacyPolicy
),
arrayOf
(
termsOfServiceListener
,
privacyPolicyListener
))
TextHelper
.
addLink
(
text_new_user_agreement
,
arrayOf
(
termsOfService
,
privacyPolicy
),
arrayOf
(
termsOfServiceListener
,
privacyPolicyListener
)
)
}
private
fun
enableUserInput
(
value
:
Boolean
)
{
...
...
app/src/main/java/chat/rocket/android/authentication/ui/AuthenticationActivity.kt
View file @
9ba67a56
...
...
@@ -21,8 +21,10 @@ import kotlinx.coroutines.experimental.launch
import
javax.inject.Inject
class
AuthenticationActivity
:
AppCompatActivity
(),
HasSupportFragmentInjector
{
@Inject
lateinit
var
fragmentDispatchingAndroidInjector
:
DispatchingAndroidInjector
<
Fragment
>
@Inject
lateinit
var
presenter
:
AuthenticationPresenter
@Inject
lateinit
var
fragmentDispatchingAndroidInjector
:
DispatchingAndroidInjector
<
Fragment
>
@Inject
lateinit
var
presenter
:
AuthenticationPresenter
val
job
=
Job
()
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
...
...
@@ -46,7 +48,7 @@ class AuthenticationActivity : AppCompatActivity(), HasSupportFragmentInjector {
override
fun
onActivityResult
(
requestCode
:
Int
,
resultCode
:
Int
,
data
:
Intent
?)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
)
val
currentFragment
=
supportFragmentManager
.
findFragmentById
(
R
.
id
.
fragment_container
)
if
(
currentFragment
!=
null
)
{
if
(
currentFragment
!=
null
)
{
currentFragment
.
onActivityResult
(
requestCode
,
resultCode
,
data
)
}
}
...
...
app/src/main/java/chat/rocket/android/main/ui/MainActivity.kt
View file @
9ba67a56
...
...
@@ -6,7 +6,6 @@ import android.os.Bundle
import
android.support.v4.app.Fragment
import
android.support.v7.app.AppCompatActivity
import
android.support.v7.widget.LinearLayoutManager
import
android.util.Log
import
android.view.Gravity
import
android.view.MenuItem
import
android.view.View
...
...
@@ -40,13 +39,8 @@ import kotlinx.coroutines.experimental.launch
import
timber.log.Timber
import
javax.inject.Inject
class
MainActivity
:
AppCompatActivity
(),
MainView
,
HasActivityInjector
,
HasSupportFragmentInjector
,
GoogleApiClient
.
ConnectionCallbacks
{
override
fun
onConnected
(
p0
:
Bundle
?)
{
}
override
fun
onConnectionSuspended
(
p0
:
Int
)
{
}
class
MainActivity
:
AppCompatActivity
(),
MainView
,
HasActivityInjector
,
HasSupportFragmentInjector
,
GoogleApiClient
.
ConnectionCallbacks
{
@Inject
lateinit
var
activityDispatchingAndroidInjector
:
DispatchingAndroidInjector
<
Activity
>
@Inject
...
...
@@ -55,7 +49,7 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector, HasSupp
lateinit
var
presenter
:
MainPresenter
private
var
isFragmentAdded
:
Boolean
=
false
private
var
expanded
=
false
private
var
googleApiClient
:
GoogleApiClient
?
=
null
private
lateinit
var
googleApiClient
:
GoogleApiClient
private
val
headerLayout
by
lazy
{
view_navigation
.
getHeaderView
(
0
)
}
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
...
...
@@ -66,7 +60,11 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector, HasSupp
launch
(
CommonPool
)
{
try
{
val
token
=
InstanceID
.
getInstance
(
this
@MainActivity
).
getToken
(
getString
(
R
.
string
.
gcm_sender_id
),
GoogleCloudMessaging
.
INSTANCE_ID_SCOPE
,
null
)
val
token
=
InstanceID
.
getInstance
(
this
@MainActivity
).
getToken
(
getString
(
R
.
string
.
gcm_sender_id
),
GoogleCloudMessaging
.
INSTANCE_ID_SCOPE
,
null
)
Timber
.
d
(
"GCM token: $token"
)
presenter
.
refreshToken
(
token
)
}
catch
(
ex
:
Exception
)
{
...
...
@@ -80,28 +78,36 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector, HasSupp
setupNavigationView
()
}
override
fun
onConnected
(
bundle
:
Bundle
?)
{
}
override
fun
onConnectionSuspended
(
errorCode
:
Int
)
{
}
private
fun
buildGoogleApiClient
()
{
googleApiClient
=
GoogleApiClient
.
Builder
(
this
)
.
enableAutoManage
(
this
,
{
Log
.
d
(
"STATUS"
,
"ERROR: connection to client failed"
)
})
.
addConnectionCallbacks
(
this
)
.
addApi
(
Auth
.
CREDENTIALS_API
)
.
build
()
.
enableAutoManage
(
this
,
{
Timber
.
d
(
"ERROR: connection to client failed"
)
})
.
addConnectionCallbacks
(
this
)
.
addApi
(
Auth
.
CREDENTIALS_API
)
.
build
()
}
override
fun
onStart
()
{
super
.
onStart
()
if
(
googleApiClient
!!
.
isConnected
)
{
Log
.
d
(
"STATUS"
,
"google api client connected successfully"
)
googleApiClient
.
let
{
if
(
it
.
isConnected
)
{
Timber
.
d
(
"Google api client connected successfully"
)
}
}
}
override
fun
disableAutoSignIn
()
{
if
(
googleApiClient
!!
.
isConnected
)
{
Auth
.
CredentialsApi
.
disableAutoSignIn
(
googleApiClient
)
}
else
{
Log
.
e
(
"STATUS"
,
"Failed to disable auto sign in"
)
googleApiClient
.
let
{
if
(
it
.
isConnected
)
{
Auth
.
CredentialsApi
.
disableAutoSignIn
(
googleApiClient
)
}
}
}
...
...
@@ -123,7 +129,7 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector, HasSupp
override
fun
showUserStatus
(
userStatus
:
UserStatus
)
{
headerLayout
.
apply
{
image_user_status
.
setImageDrawable
(
DrawableHelper
.
getUserStatusDrawable
(
userStatus
,
this
.
context
)
DrawableHelper
.
getUserStatusDrawable
(
userStatus
,
this
.
context
)
)
}
}
...
...
@@ -134,7 +140,7 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector, HasSupp
with
(
viewModel
)
{
if
(
userStatus
!=
null
)
{
image_user_status
.
setImageDrawable
(
DrawableHelper
.
getUserStatusDrawable
(
userStatus
,
context
)
DrawableHelper
.
getUserStatusDrawable
(
userStatus
,
context
)
)
}
if
(
userDisplayName
!=
null
)
{
...
...
@@ -158,19 +164,29 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector, HasSupp
override
fun
alertNotRecommendedVersion
()
{
AlertDialog
.
Builder
(
this
)
.
setMessage
(
getString
(
R
.
string
.
msg_ver_not_recommended
,
BuildConfig
.
RECOMMENDED_SERVER_VERSION
))
.
setPositiveButton
(
R
.
string
.
msg_ok
,
null
)
.
create
()
.
show
()
.
setMessage
(
getString
(
R
.
string
.
msg_ver_not_recommended
,
BuildConfig
.
RECOMMENDED_SERVER_VERSION
)
)
.
setPositiveButton
(
R
.
string
.
msg_ok
,
null
)
.
create
()
.
show
()
}
override
fun
blockAndAlertNotRequiredVersion
()
{
AlertDialog
.
Builder
(
this
)
.
setMessage
(
getString
(
R
.
string
.
msg_ver_not_minimum
,
BuildConfig
.
REQUIRED_SERVER_VERSION
))
.
setOnDismissListener
{
presenter
.
logout
()
}
.
setPositiveButton
(
R
.
string
.
msg_ok
,
null
)
.
create
()
.
show
()
.
setMessage
(
getString
(
R
.
string
.
msg_ver_not_minimum
,
BuildConfig
.
REQUIRED_SERVER_VERSION
)
)
.
setOnDismissListener
{
presenter
.
logout
()
}
.
setPositiveButton
(
R
.
string
.
msg_ok
,
null
)
.
create
()
.
show
()
}
private
fun
setupAccountsList
(
header
:
View
,
accounts
:
List
<
Account
>)
{
...
...
@@ -215,7 +231,8 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector, HasSupp
override
fun
activityInjector
():
AndroidInjector
<
Activity
>
=
activityDispatchingAndroidInjector
override
fun
supportFragmentInjector
():
AndroidInjector
<
Fragment
>
=
fragmentDispatchingAndroidInjector
override
fun
supportFragmentInjector
():
AndroidInjector
<
Fragment
>
=
fragmentDispatchingAndroidInjector
private
fun
setupToolbar
()
{
setSupportActionBar
(
toolbar
)
...
...
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