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
afdca6e7
Commit
afdca6e7
authored
Apr 28, 2019
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show server name (when not null) on server bottom sheet view instead of its url
parent
7e98a305
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
6 deletions
+47
-6
LoginPresenter.kt
...droid/authentication/login/presentation/LoginPresenter.kt
+9
-1
LoginOptionsPresenter.kt
...cation/loginoptions/presentation/LoginOptionsPresenter.kt
+9
-1
RegisterUsernamePresenter.kt
...egisterusername/presentation/RegisterUsernamePresenter.kt
+9
-1
SignupPresenter.kt
...oid/authentication/signup/presentation/SignupPresenter.kt
+9
-1
TwoFAPresenter.kt
...d/authentication/twofactor/presentation/TwoFAPresenter.kt
+9
-1
Account.kt
...n/java/chat/rocket/android/server/domain/model/Account.kt
+1
-0
ServerViewHolder.kt
...a/chat/rocket/android/servers/adapter/ServerViewHolder.kt
+1
-1
No files found.
app/src/main/java/chat/rocket/android/authentication/login/presentation/LoginPresenter.kt
View file @
afdca6e7
...
...
@@ -15,6 +15,7 @@ import chat.rocket.android.server.domain.favicon
import
chat.rocket.android.server.domain.isLdapAuthenticationEnabled
import
chat.rocket.android.server.domain.isPasswordResetEnabled
import
chat.rocket.android.server.domain.model.Account
import
chat.rocket.android.server.domain.siteName
import
chat.rocket.android.server.domain.wideTile
import
chat.rocket.android.server.infrastructure.RocketChatClientFactory
import
chat.rocket.android.util.extension.launchUI
...
...
@@ -142,7 +143,14 @@ class LoginPresenter @Inject constructor(
currentServer
.
serverLogoUrl
(
it
)
}
val
thumb
=
currentServer
.
avatarUrl
(
username
,
token
?.
userId
,
token
?.
authToken
)
val
account
=
Account
(
currentServer
,
icon
,
logo
,
username
,
thumb
)
val
account
=
Account
(
settings
.
siteName
()
?:
currentServer
,
currentServer
,
icon
,
logo
,
username
,
thumb
)
saveAccountInteractor
.
save
(
account
)
}
...
...
app/src/main/java/chat/rocket/android/authentication/loginoptions/presentation/LoginOptionsPresenter.kt
View file @
afdca6e7
...
...
@@ -14,6 +14,7 @@ import chat.rocket.android.server.domain.SaveCurrentServerInteractor
import
chat.rocket.android.server.domain.TokenRepository
import
chat.rocket.android.server.domain.favicon
import
chat.rocket.android.server.domain.model.Account
import
chat.rocket.android.server.domain.siteName
import
chat.rocket.android.server.domain.wideTile
import
chat.rocket.android.server.infrastructure.RocketChatClientFactory
import
chat.rocket.android.util.extension.launchUI
...
...
@@ -182,7 +183,14 @@ class LoginOptionsPresenter @Inject constructor(
currentServer
.
serverLogoUrl
(
it
)
}
val
thumb
=
currentServer
.
avatarUrl
(
username
,
token
?.
userId
,
token
?.
authToken
)
val
account
=
Account
(
currentServer
,
icon
,
logo
,
username
,
thumb
)
val
account
=
Account
(
settings
.
siteName
()
?:
currentServer
,
currentServer
,
icon
,
logo
,
username
,
thumb
)
saveAccountInteractor
.
save
(
account
)
}
...
...
app/src/main/java/chat/rocket/android/authentication/registerusername/presentation/RegisterUsernamePresenter.kt
View file @
afdca6e7
...
...
@@ -12,6 +12,7 @@ import chat.rocket.android.server.domain.SaveCurrentServerInteractor
import
chat.rocket.android.server.domain.TokenRepository
import
chat.rocket.android.server.domain.favicon
import
chat.rocket.android.server.domain.model.Account
import
chat.rocket.android.server.domain.siteName
import
chat.rocket.android.server.domain.wideTile
import
chat.rocket.android.server.infrastructure.RocketChatClientFactory
import
chat.rocket.android.util.extension.launchUI
...
...
@@ -81,7 +82,14 @@ class RegisterUsernamePresenter @Inject constructor(
currentServer
.
serverLogoUrl
(
it
)
}
val
thumb
=
currentServer
.
avatarUrl
(
username
,
token
?.
userId
,
token
?.
authToken
)
val
account
=
Account
(
currentServer
,
icon
,
logo
,
username
,
thumb
)
val
account
=
Account
(
settings
.
siteName
()
?:
currentServer
,
currentServer
,
icon
,
logo
,
username
,
thumb
)
saveAccountInteractor
.
save
(
account
)
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/authentication/signup/presentation/SignupPresenter.kt
View file @
afdca6e7
...
...
@@ -13,6 +13,7 @@ import chat.rocket.android.server.domain.SaveCurrentServerInteractor
import
chat.rocket.android.server.domain.TokenRepository
import
chat.rocket.android.server.domain.favicon
import
chat.rocket.android.server.domain.model.Account
import
chat.rocket.android.server.domain.siteName
import
chat.rocket.android.server.domain.wideTile
import
chat.rocket.android.server.infrastructure.RocketChatClientFactory
import
chat.rocket.android.util.extension.launchUI
...
...
@@ -102,7 +103,14 @@ class SignupPresenter @Inject constructor(
currentServer
.
serverLogoUrl
(
it
)
}
val
thumb
=
currentServer
.
avatarUrl
(
me
.
username
!!
,
token
?.
userId
,
token
?.
authToken
)
val
account
=
Account
(
currentServer
,
icon
,
logo
,
me
.
username
!!
,
thumb
)
val
account
=
Account
(
settings
.
siteName
()
?:
currentServer
,
currentServer
,
icon
,
logo
,
me
.
username
!!
,
thumb
)
saveAccountInteractor
.
save
(
account
)
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/authentication/twofactor/presentation/TwoFAPresenter.kt
View file @
afdca6e7
...
...
@@ -13,6 +13,7 @@ import chat.rocket.android.server.domain.SaveCurrentServerInteractor
import
chat.rocket.android.server.domain.TokenRepository
import
chat.rocket.android.server.domain.favicon
import
chat.rocket.android.server.domain.model.Account
import
chat.rocket.android.server.domain.siteName
import
chat.rocket.android.server.domain.wideTile
import
chat.rocket.android.server.infrastructure.RocketChatClientFactory
import
chat.rocket.android.util.extension.launchUI
...
...
@@ -103,7 +104,14 @@ class TwoFAPresenter @Inject constructor(
currentServer
.
serverLogoUrl
(
it
)
}
val
thumb
=
currentServer
.
avatarUrl
(
me
.
username
!!
,
token
?.
userId
,
token
?.
authToken
)
val
account
=
Account
(
currentServer
,
icon
,
logo
,
me
.
username
!!
,
thumb
)
val
account
=
Account
(
settings
.
siteName
()
?:
currentServer
,
currentServer
,
icon
,
logo
,
me
.
username
!!
,
thumb
)
saveAccountInteractor
.
save
(
account
)
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/server/domain/model/Account.kt
View file @
afdca6e7
...
...
@@ -4,6 +4,7 @@ import se.ansman.kotshi.JsonSerializable
@JsonSerializable
data class
Account
(
val
serverName
:
String
?,
val
serverUrl
:
String
,
val
serverLogo
:
String
?,
val
serverBg
:
String
?,
...
...
app/src/main/java/chat/rocket/android/servers/adapter/ServerViewHolder.kt
View file @
afdca6e7
...
...
@@ -13,7 +13,7 @@ class ServerViewHolder(itemView: View, private val currentServerUrl: String) :
fun
bind
(
account
:
Account
)
{
with
(
itemView
)
{
Glide
.
with
(
context
).
load
(
account
.
serverLogo
).
into
(
image_server
)
text_server_name
.
text
=
account
.
serverUrl
text_server_name
.
text
=
account
.
server
Name
?:
account
.
server
Url
text_server_url
.
text
=
account
.
serverUrl
image_check
.
isInvisible
=
currentServerUrl
!=
account
.
serverUrl
}
...
...
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