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
a3830e75
Commit
a3830e75
authored
Dec 19, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug with lateinit property being not initialized.
parent
49eb678e
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
100 additions
and
110 deletions
+100
-110
ChatRoomPresenter.kt
...rocket/android/chatroom/presentation/ChatRoomPresenter.kt
+9
-10
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+81
-90
LocalRepository.kt
...ava/chat/rocket/android/infrastructure/LocalRepository.kt
+1
-1
strings.xml
app/src/main/res/values-de/strings.xml
+1
-1
strings.xml
app/src/main/res/values-es/strings.xml
+1
-1
strings.xml
app/src/main/res/values-fr/strings.xml
+1
-1
strings.xml
app/src/main/res/values-hi-rIN/strings.xml
+1
-1
strings.xml
app/src/main/res/values-it/strings.xml
+1
-1
strings.xml
app/src/main/res/values-ja/strings.xml
+1
-1
strings.xml
app/src/main/res/values-pt-rBR/strings.xml
+1
-1
strings.xml
app/src/main/res/values-ru-rRU/strings.xml
+1
-1
strings.xml
app/src/main/res/values-tr/strings.xml
+1
-1
No files found.
app/src/main/java/chat/rocket/android/chatroom/presentation/ChatRoomPresenter.kt
View file @
a3830e75
...
...
@@ -123,7 +123,7 @@ class ChatRoomPresenter @Inject constructor(
private
var
lastState
=
manager
.
state
private
var
typingStatusList
=
arrayListOf
<
String
>()
private
val
roomChangesChannel
=
Channel
<
Room
>(
Channel
.
CONFLATED
)
private
lateinit
var
unfinishedMessage
Key
:
String
private
lateinit
var
draft
Key
:
String
fun
setupChatRoom
(
roomId
:
String
,
...
...
@@ -131,17 +131,17 @@ class ChatRoomPresenter @Inject constructor(
roomType
:
String
,
chatRoomMessage
:
String
?
=
null
)
{
draftKey
=
"${currentServer}_${LocalRepository.DRAFT_KEY}$roomId"
chatRoomId
=
roomId
chatRoomType
=
roomType
launch
(
CommonPool
+
strategy
.
jobs
)
{
try
{
unfinishedMessageKey
=
"${currentServer}_${LocalRepository.UNFINISHED_MSG_KEY}$roomId"
chatRoomId
=
roomId
chatRoomType
=
roomType
chatRoles
=
if
(
roomTypeOf
(
roomType
)
!
is
RoomType
.
DirectMessage
)
{
client
.
chatRoomRoles
(
roomType
=
roomTypeOf
(
roomType
),
roomName
=
roomName
)
}
else
{
emptyList
()
}
}
catch
(
ex
:
RocketChat
Exception
)
{
}
catch
(
ex
:
Exception
)
{
Timber
.
e
(
ex
)
chatRoles
=
emptyList
()
}
finally
{
...
...
@@ -187,7 +187,6 @@ class ChatRoomPresenter @Inject constructor(
}
}
}
}
}
...
...
@@ -919,7 +918,7 @@ class ChatRoomPresenter @Inject constructor(
navigator
.
toChatDetails
(
chatRoomId
,
chatRoomType
,
isSubscribed
,
isMenuDisabled
)
}
fun
loadChatRooms
()
{
fun
loadChatRooms
Suggestions
()
{
launchUI
(
strategy
)
{
try
{
val
chatRooms
=
getChatRoomsAsync
()
...
...
@@ -1297,12 +1296,12 @@ class ChatRoomPresenter @Inject constructor(
*/
fun
saveUnfinishedMessage
(
unfinishedMessage
:
String
)
{
if
(
unfinishedMessage
.
isNotBlank
())
{
localRepository
.
save
(
unfinishedMessage
Key
,
unfinishedMessage
)
localRepository
.
save
(
draft
Key
,
unfinishedMessage
)
}
}
fun
clearUnfinishedMessage
()
{
localRepository
.
clear
(
unfinishedMessage
Key
)
localRepository
.
clear
(
draft
Key
)
}
/**
* Get unfinished message from local repository, when user left chat room without
...
...
@@ -1311,6 +1310,6 @@ class ChatRoomPresenter @Inject constructor(
* @return Returns the unfinished message, null otherwise.
*/
fun
getUnfinishedMessage
():
String
?
{
return
localRepository
.
get
(
unfinishedMessage
Key
)
return
localRepository
.
get
(
draft
Key
)
}
}
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
a3830e75
This diff is collapsed.
Click to expand it.
app/src/main/java/chat/rocket/android/infrastructure/LocalRepository.kt
View file @
a3830e75
...
...
@@ -27,7 +27,7 @@ interface LocalRepository {
const
val
SETTINGS_KEY
=
"settings_"
const
val
PERMISSIONS_KEY
=
"permissions_"
const
val
USER_KEY
=
"user_"
const
val
UNFINISHED_MSG_KEY
=
"unfinished_msg_
"
const
val
DRAFT_KEY
=
"draft
"
const
val
CURRENT_USERNAME_KEY
=
"username_"
const
val
LAST_CHATROOMS_REFRESH
=
"_chatrooms_refresh"
}
...
...
app/src/main/res/values-de/strings.xml
View file @
a3830e75
...
...
@@ -146,7 +146,7 @@
<string
name=
"msg_send"
>
Sende
</string>
<string
name=
"msg_sent_attachment"
>
Sende Anhang
</string>
<string
name=
"msg_welcome_to_rocket_chat"
>
Willkommen bei Rocket.Chat
</string>
<string
name=
"msg_team_communication"
>
Open Source-Kommunikation
</string
>
<string
name=
"msg_team_communication"
>
Team Communication
</string>
<!-- TODO Translate --
>
<string
name=
"msg_login_with_email"
>
Einloggen mit
<b>
e-mail
</b></string>
<string
name=
"msg_create_account"
>
Ein Konto erstellen
</string>
<string
name=
"msg_continue_with_facebook"
>
Weitermachen mit
<b>
Facebook
</b></string>
...
...
app/src/main/res/values-es/strings.xml
View file @
a3830e75
...
...
@@ -146,7 +146,7 @@
<string
name=
"msg_delete_description"
>
Seguro que quieres borrar este mensaje
</string>
<string
name=
"msg_no_search_found"
>
No se han encontrado resultados
</string>
<string
name=
"msg_welcome_to_rocket_chat"
>
Welcome to Rocket.Chat
</string>
<!-- TODO Add translation -->
<string
name=
"msg_team_communication"
>
Open Source Communication
</string>
<!-- TODO Add translation
-->
<string
name=
"msg_team_communication"
>
Team Communication
</string>
<!-- TODO Translate
-->
<string
name=
"msg_login_with_email"
>
Login with
<b>
e-mail
</b></string>
<!-- TODO Add translation -->
<string
name=
"msg_create_account"
>
Create an account
</string>
<!-- TODO Add translation -->
<string
name=
"msg_continue_with_facebook"
>
Continue with
<b>
Facebook
</b></string>
<!-- TODO Add translation -->
...
...
app/src/main/res/values-fr/strings.xml
View file @
a3830e75
...
...
@@ -150,7 +150,7 @@
<string
name=
"msg_delete_message"
>
Supprimer Message
</string>
<string
name=
"msg_delete_description"
>
Êtes-vous sûr de vouloir supprimer ce message
</string>
<string
name=
"msg_welcome_to_rocket_chat"
>
Welcome to Rocket.Chat
</string>
<!-- TODO Add translation -->
<string
name=
"msg_team_communication"
>
Open Source Communication
</string>
<!-- TODO Add translation
-->
<string
name=
"msg_team_communication"
>
Team Communication
</string>
<!-- TODO Translate
-->
<string
name=
"msg_login_with_email"
>
Login with
<b>
e-mail
</b></string>
<!-- TODO Add translation -->
<string
name=
"msg_create_account"
>
Create an account
</string>
<!-- TODO Add translation -->
<string
name=
"msg_continue_with_facebook"
>
Continue with
<b>
Facebook
</b></string>
<!-- TODO Add translation -->
...
...
app/src/main/res/values-hi-rIN/strings.xml
View file @
a3830e75
...
...
@@ -152,7 +152,7 @@
<string
name=
"msg_delete_message"
>
संदेश को हटाएं
</string>
<string
name=
"msg_delete_description"
>
क्या आप निश्चित रूप से यह संदेश हटाना चाहते हैं
</string>
<string
name=
"msg_welcome_to_rocket_chat"
>
Rocket.Chat में आपका स्वागत है
</string>
<string
name=
"msg_team_communication"
>
ओपन सोर्स कम्युनिकेशन
</string
>
<string
name=
"msg_team_communication"
>
Team Communication
</string>
<!-- TODO Translate --
>
<string
name=
"msg_login_with_email"
>
ई-मेल के साथ लॉगिन करें
</string>
<string
name=
"msg_create_account"
>
खाता बनाएं
</string>
<string
name=
"msg_continue_with_facebook"
><b>
Facebook
</b>
के साथ जारी रखें
</string>
...
...
app/src/main/res/values-it/strings.xml
View file @
a3830e75
...
...
@@ -146,7 +146,7 @@
<string
name=
"msg_send"
>
Inviare
</string>
<string
name=
"msg_sent_attachment"
>
Inviato allegato
</string>
<string
name=
"msg_welcome_to_rocket_chat"
>
Benvenuto in Rocket.Chat
</string>
<string
name=
"msg_team_communication"
>
Team Communication
</string>
<string
name=
"msg_team_communication"
>
Team Communication
</string>
<!-- TODO Translate -->
<string
name=
"msg_login_with_email"
>
Accedi con
<b>
e-mail
</b></string>
<string
name=
"msg_create_account"
>
Crea un utente
</string>
<string
name=
"msg_continue_with_facebook"
>
Continua con
<b>
Facebook
</b></string>
...
...
app/src/main/res/values-ja/strings.xml
View file @
a3830e75
...
...
@@ -151,7 +151,7 @@
<string
name=
"msg_send"
>
送信
</string>
<string
name=
"msg_sent_attachment"
>
添付ファイルを送信しました
</string>
<string
name=
"msg_welcome_to_rocket_chat"
>
Rocket.Chatへようこそ
</string>
<string
name=
"msg_team_communication"
>
チームコミュニケーション
</string
>
<string
name=
"msg_team_communication"
>
Team Communication
</string>
<!-- TODO Translate --
>
<string
name=
"msg_login_with_email"
><b>
e-mail
</b>
でログイン
</string>
<string
name=
"msg_create_account"
>
アカウントを作成
</string>
<string
name=
"msg_continue_with_facebook"
><b>
Facebook
</b>
でログイン
</string>
...
...
app/src/main/res/values-pt-rBR/strings.xml
View file @
a3830e75
...
...
@@ -151,7 +151,7 @@
<string
name=
"msg_delete_message"
>
Remove mensagem
</string>
<string
name=
"msg_delete_description"
>
Tem certeza que quer apagar esta mensagem?
</string>
<string
name=
"msg_welcome_to_rocket_chat"
>
Bem-vindo ao Rocket.Chat
</string>
<string
name=
"msg_team_communication"
>
Comunicação
Open Source
</string>
<string
name=
"msg_team_communication"
>
Comunicação
para equipes
</string>
<string
name=
"msg_login_with_email"
>
Fazer login com
<b>
e-mail
</b></string>
<string
name=
"msg_create_account"
>
Criar conta
</string>
<string
name=
"msg_continue_with_facebook"
>
Continuar com
<b>
Facebook
</b></string>
...
...
app/src/main/res/values-ru-rRU/strings.xml
View file @
a3830e75
...
...
@@ -149,7 +149,7 @@
<string
name=
"msg_channel_name"
>
Название канала
</string>
<string
name=
"msg_search"
>
Поиск
</string>
<string
name=
"msg_welcome_to_rocket_chat"
>
Rocket.Chat
</string>
<string
name=
"msg_team_communication"
>
Чат с открытым исходным кодом
</string
>
<string
name=
"msg_team_communication"
>
Team Communication
</string>
<!-- TODO Translate --
>
<string
name=
"msg_login_with_email"
>
Войти с помощью
<b>
e-mail
</b></string>
<string
name=
"msg_create_account"
>
Создать аккаунт
</string>
<string
name=
"msg_continue_with_facebook"
>
Войти с помощью
<b>
Facebook
</b></string>
...
...
app/src/main/res/values-tr/strings.xml
View file @
a3830e75
...
...
@@ -150,7 +150,7 @@
<string
name=
"msg_send"
>
Gönder
</string>
<string
name=
"msg_sent_attachment"
>
Bir dosya eki gönderildi
</string>
<string
name=
"msg_welcome_to_rocket_chat"
>
Welcome to Rocket.Chat
</string>
<!-- TODO Add translation -->
<string
name=
"msg_team_communication"
>
Team Communication
</string>
<!-- TODO
Add translation
-->
<string
name=
"msg_team_communication"
>
Team Communication
</string>
<!-- TODO
Translate
-->
<string
name=
"msg_login_with_email"
>
Login with
<b>
e-mail
</b></string>
<!-- TODO Add translation -->
<string
name=
"msg_create_account"
>
Create an account
</string>
<!-- TODO Add translation -->
<string
name=
"msg_continue_with_facebook"
>
Continue with
<b>
Facebook
</b></string>
<!-- TODO Add translation -->
...
...
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