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
c736eff3
Unverified
Commit
c736eff3
authored
Oct 07, 2018
by
Divyanshu Bhargava
Committed by
GitHub
Oct 07, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #59 from RocketChat/develop
merge
parents
5a587478
2b9e7144
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
31 additions
and
6 deletions
+31
-6
TwoFAPresenter.kt
...d/authentication/twofactor/presentation/TwoFAPresenter.kt
+7
-1
UiModelMapper.kt
...ava/chat/rocket/android/chatroom/uimodel/UiModelMapper.kt
+6
-5
strings.xml
app/src/main/res/values-de/strings.xml
+2
-0
strings.xml
app/src/main/res/values-es/strings.xml
+2
-0
strings.xml
app/src/main/res/values-fr/strings.xml
+2
-0
strings.xml
app/src/main/res/values-hi-rIN/strings.xml
+2
-0
strings.xml
app/src/main/res/values-ja/strings.xml
+2
-0
strings.xml
app/src/main/res/values-pt-rBR/strings.xml
+1
-0
strings.xml
app/src/main/res/values-ru-rRU/strings.xml
+2
-0
strings.xml
app/src/main/res/values-tr/strings.xml
+2
-0
strings.xml
app/src/main/res/values-uk/strings.xml
+2
-0
strings.xml
app/src/main/res/values/strings.xml
+1
-0
No files found.
app/src/main/java/chat/rocket/android/authentication/twofactor/presentation/TwoFAPresenter.kt
View file @
c736eff3
...
...
@@ -17,12 +17,14 @@ import chat.rocket.android.server.domain.wideTile
import
chat.rocket.android.server.infraestructure.RocketChatClientFactory
import
chat.rocket.android.util.extension.launchUI
import
chat.rocket.android.util.extensions.avatarUrl
import
chat.rocket.android.util.extensions.isEmail
import
chat.rocket.android.util.extensions.serverLogoUrl
import
chat.rocket.android.util.retryIO
import
chat.rocket.common.RocketChatAuthException
import
chat.rocket.common.RocketChatException
import
chat.rocket.common.util.ifNull
import
chat.rocket.core.internal.rest.login
import
chat.rocket.core.internal.rest.loginWithEmail
import
chat.rocket.core.internal.rest.me
import
chat.rocket.core.model.Myself
import
javax.inject.Inject
...
...
@@ -64,7 +66,11 @@ class TwoFAPresenter @Inject constructor(
try
{
// The token is saved via the client TokenProvider
val
token
=
retryIO
(
"login"
)
{
client
.
login
(
usernameOrEmail
,
password
,
twoFactorAuthenticationCode
)
if
(
usernameOrEmail
.
isEmail
())
{
client
.
loginWithEmail
(
usernameOrEmail
,
password
,
twoFactorAuthenticationCode
)
}
else
{
client
.
login
(
usernameOrEmail
,
password
,
twoFactorAuthenticationCode
)
}
}
val
me
=
retryIO
(
"me"
)
{
client
.
me
()
}
saveAccount
(
me
)
...
...
app/src/main/java/chat/rocket/android/chatroom/uimodel/UiModelMapper.kt
View file @
c736eff3
...
...
@@ -321,10 +321,10 @@ class UiModelMapper @Inject constructor(
val
dayMarkerText
=
DateTimeHelper
.
getFormattedDateForMessages
(
localDateTime
,
context
)
ActionsAttachmentUiModel
(
attachmentUrl
=
url
,
title
=
title
,
actions
=
actions
,
buttonAlignment
=
buttonAlignment
,
message
=
message
,
rawData
=
attachment
,
messageId
=
message
.
id
,
reactions
=
getReactions
(
message
),
preview
=
message
.
copy
(
message
=
content
.
message
),
unread
=
message
.
unread
,
showDayMarker
=
false
,
currentDayMarkerText
=
dayMarkerText
)
actions
=
actions
,
buttonAlignment
=
buttonAlignment
,
message
=
message
,
rawData
=
attachment
,
messageId
=
message
.
id
,
reactions
=
getReactions
(
message
),
preview
=
message
.
copy
(
message
=
content
.
message
),
unread
=
message
.
unread
,
showDayMarker
=
false
,
currentDayMarkerText
=
dayMarkerText
)
}
}
...
...
@@ -580,7 +580,7 @@ class UiModelMapper @Inject constructor(
private
fun
getSystemMessage
(
message
:
Message
):
CharSequence
{
val
content
=
when
(
message
.
type
)
{
//TODO: Add implementation for Welcome type.
//TODO: Add implementation for Welcome type.
is
MessageType
.
MessageRemoved
->
context
.
getString
(
R
.
string
.
message_removed
)
is
MessageType
.
UserJoined
->
context
.
getString
(
R
.
string
.
message_user_joined_channel
)
is
MessageType
.
UserLeft
->
context
.
getString
(
R
.
string
.
message_user_left
)
...
...
@@ -592,6 +592,7 @@ class UiModelMapper @Inject constructor(
is
MessageType
.
UserUnMuted
->
context
.
getString
(
R
.
string
.
message_unmuted
,
message
.
message
,
message
.
sender
?.
username
)
is
MessageType
.
SubscriptionRoleAdded
->
context
.
getString
(
R
.
string
.
message_role_add
,
message
.
message
,
message
.
role
,
message
.
sender
?.
username
)
is
MessageType
.
SubscriptionRoleRemoved
->
context
.
getString
(
R
.
string
.
message_role_removed
,
message
.
message
,
message
.
role
,
message
.
sender
?.
username
)
is
MessageType
.
RoomChangedPrivacy
->
context
.
getString
(
R
.
string
.
message_room_changed_privacy
,
message
.
message
,
message
.
sender
?.
username
)
else
->
{
throw
InvalidParameterException
(
"Invalid message type: ${message.type}"
)
}
...
...
app/src/main/res/values-de/strings.xml
View file @
c736eff3
...
...
@@ -286,4 +286,6 @@
<string
name=
"notif_success_sending"
>
Nachricht gesendet nach %1$s!
</string>
<string
name=
"read_by"
>
Gelesen von
</string>
<string
name=
"message_information_title"
>
Nachricht Information
</string>
<!--TODO - Add proper translation-->
<string
name=
"message_room_changed_privacy"
>
Room type changed to: %1$s by %2$s
</string>
</resources>
\ No newline at end of file
app/src/main/res/values-es/strings.xml
View file @
c736eff3
...
...
@@ -289,5 +289,7 @@
<string
name=
"msg_file_description"
>
Descripción del archivo
</string>
<string
name=
"msg_send"
>
Enviar
</string>
<string
name=
"msg_sent_attachment"
>
Envió un archivo
</string>
<!--TODO - Add proper translation-->
<string
name=
"message_room_changed_privacy"
>
Room type changed to: %1$s by %2$s
</string>
</resources>
app/src/main/res/values-fr/strings.xml
View file @
c736eff3
...
...
@@ -290,4 +290,6 @@
<string
name=
"message_information_title"
>
Informations sur le message
</string>
<string
name=
"msg_log_out"
>
Déconnecter…
</string>
<string
name=
"msg_sent_attachment"
>
Envoyé un fichier
</string>
<!--TODO - Add proper translation-->
<string
name=
"message_room_changed_privacy"
>
Room type changed to: %1$s by %2$s
</string>
</resources>
\ No newline at end of file
app/src/main/res/values-hi-rIN/strings.xml
View file @
c736eff3
...
...
@@ -291,4 +291,6 @@
<string
name=
"read_by"
>
द्वारा पढ़ें
</string>
<string
name=
"message_information_title"
>
संदेश की जानकारी
</string>
<string
name=
"msg_log_out"
>
लॉग आउट कर रहा हूं…
</string>
<!--TODO - Add proper translation-->
<string
name=
"message_room_changed_privacy"
>
Room type changed to: %1$s by %2$s
</string>
</resources>
app/src/main/res/values-ja/strings.xml
View file @
c736eff3
...
...
@@ -292,4 +292,6 @@
<string
name=
"notif_success_sending"
>
メッセージは %1$s に送信されました!
</string>
<string
name=
"read_by"
>
読者
</string>
<string
name=
"message_information_title"
>
メッセージ情報
</string>
<!--TODO - Add proper translation-->
<string
name=
"message_room_changed_privacy"
>
Room type changed to: %1$s by %2$s
</string>
</resources>
\ No newline at end of file
app/src/main/res/values-pt-rBR/strings.xml
View file @
c736eff3
...
...
@@ -289,4 +289,5 @@
<string
name=
"message_information_title"
>
Informações da mensagem
</string>
<string
name=
"msg_log_out"
>
Deslogando…
</string>
<string
name=
"msg_sent_attachment"
>
Enviou um arquivo
</string>
<string
name=
"message_room_changed_privacy"
>
O tipo da sala mudou para: %1$s por %2$s
</string>
</resources>
app/src/main/res/values-ru-rRU/strings.xml
View file @
c736eff3
...
...
@@ -285,4 +285,6 @@
<string
name=
"read_by"
>
Прочитано
</string>
<string
name=
"message_information_title"
>
Информация о прочтении
</string>
<string
name=
"msg_log_out"
>
Выходим…
</string>
<!--TODO - Add proper translation-->
<string
name=
"message_room_changed_privacy"
>
Room type changed to: %1$s by %2$s
</string>
</resources>
app/src/main/res/values-tr/strings.xml
View file @
c736eff3
...
...
@@ -288,5 +288,7 @@
<string
name=
"notif_success_sending"
>
Mesaj %1$s\'a gönderildi!
</string>
<string
name=
"read_by"
>
ile oku
</string>
<string
name=
"message_information_title"
>
Mesaj bilgisi
</string>
<!--TODO - Add proper translation-->
<string
name=
"message_room_changed_privacy"
>
Room type changed to: %1$s by %2$s
</string>
</resources>
app/src/main/res/values-uk/strings.xml
View file @
c736eff3
...
...
@@ -287,4 +287,6 @@
<string
name=
"message_information_title"
>
Інформація про прочитання
</string>
<string
name=
"msg_log_out"
>
Виходимо…
</string>
<string
name=
"msg_sent_attachment"
>
Долучення відправлено
</string>
<!--TODO - Add proper translation-->
<string
name=
"message_room_changed_privacy"
>
Room type changed to: %1$s by %2$s
</string>
</resources>
app/src/main/res/values/strings.xml
View file @
c736eff3
...
...
@@ -303,4 +303,5 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<string
name=
"message_information_title"
>
Message information
</string>
<string
name=
"foss"
tools:ignore=
"MissingTranslation"
>
(FOSS)
</string>
<string
name=
"message_room_changed_privacy"
>
Room type changed to: %1$s by %2$s
</string>
</resources>
\ 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