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
d92e3ab2
Commit
d92e3ab2
authored
Mar 08, 2019
by
Divyanshu Bhargava
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/fix-2038' into fix-2038
parents
f140ba58
900ae00b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
8 deletions
+17
-8
ChatRoomPresenter.kt
...rocket/android/chatroom/presentation/ChatRoomPresenter.kt
+3
-1
ChatRoomsPresenter.kt
...cket/android/chatrooms/presentation/ChatRoomsPresenter.kt
+2
-0
MainActivity.kt
...src/main/java/chat/rocket/android/main/ui/MainActivity.kt
+6
-0
ProfilePresenter.kt
...t/rocket/android/profile/presentation/ProfilePresenter.kt
+5
-5
SettingsFragment.kt
.../java/chat/rocket/android/settings/ui/SettingsFragment.kt
+0
-1
strings.xml
app/src/main/res/values-ru-rRU/strings.xml
+1
-1
No files found.
app/src/main/java/chat/rocket/android/chatroom/presentation/ChatRoomPresenter.kt
View file @
d92e3ab2
...
...
@@ -316,16 +316,18 @@ class ChatRoomPresenter @Inject constructor(
fun
sendMessage
(
chatRoomId
:
String
,
text
:
String
,
messageId
:
String
?)
{
launchUI
(
strategy
)
{
try
{
view
.
disableSendMessageButton
()
// ignore message for now, will receive it on the stream
if
(
messageId
==
null
)
{
val
id
=
UUID
.
randomUUID
().
toString
()
val
username
=
userHelper
.
username
()
val
user
=
userHelper
.
user
()
val
newMessage
=
Message
(
id
=
id
,
roomId
=
chatRoomId
,
message
=
text
,
timestamp
=
Instant
.
now
().
toEpochMilli
(),
sender
=
SimpleUser
(
null
,
username
,
user
name
),
sender
=
SimpleUser
(
user
?.
id
,
user
?.
username
?:
username
,
user
?.
name
),
attachments
=
null
,
avatar
=
currentServer
.
avatarUrl
(
username
?:
""
),
channels
=
null
,
...
...
app/src/main/java/chat/rocket/android/chatrooms/presentation/ChatRoomsPresenter.kt
View file @
d92e3ab2
...
...
@@ -2,6 +2,7 @@ package chat.rocket.android.chatrooms.presentation
import
chat.rocket.android.R
import
chat.rocket.android.chatrooms.adapter.model.RoomUiModel
import
chat.rocket.android.chatrooms.domain.FetchChatRoomsInteractor
import
chat.rocket.android.core.lifecycle.CancelStrategy
import
chat.rocket.android.db.DatabaseManager
import
chat.rocket.android.db.model.ChatRoomEntity
...
...
@@ -116,6 +117,7 @@ class ChatRoomsPresenter @Inject constructor(
retryIO
(
"createDirectMessage($name)"
)
{
withTimeout
(
10000
)
{
createDirectMessage
(
name
)
FetchChatRoomsInteractor
(
client
,
dbManager
).
refreshChatRooms
()
}
}
val
fromTo
=
mutableListOf
(
myself
.
id
,
id
).
apply
{
...
...
app/src/main/java/chat/rocket/android/main/ui/MainActivity.kt
View file @
d92e3ab2
...
...
@@ -38,6 +38,9 @@ import kotlinx.android.synthetic.main.activity_main.*
import
kotlinx.android.synthetic.main.app_bar.*
import
kotlinx.android.synthetic.main.nav_header.view.*
import
javax.inject.Inject
import
android.app.NotificationManager
import
android.content.Context
private
const
val
CURRENT_STATE
=
"current_state"
...
...
@@ -90,6 +93,9 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector,
presenter
.
toChatList
(
chatRoomId
)
isFragmentAdded
=
true
}
val
notificationManager
=
getSystemService
(
Context
.
NOTIFICATION_SERVICE
)
as
NotificationManager
notificationManager
.
cancelAll
()
}
override
fun
onDestroy
()
{
...
...
app/src/main/java/chat/rocket/android/profile/presentation/ProfilePresenter.kt
View file @
d92e3ab2
...
...
@@ -82,7 +82,7 @@ class ProfilePresenter @Inject constructor(
view
.
showLoading
()
try
{
user
?.
id
?.
let
{
id
->
retryIO
{
client
.
updateProfile
(
id
,
email
,
name
,
username
)
}
retryIO
{
client
.
updateProfile
(
userId
=
id
,
email
=
email
,
name
=
name
,
username
=
username
)
}
view
.
showProfileUpdateSuccessfullyMessage
()
view
.
showProfile
(
serverUrl
.
avatarUrl
(
user
.
username
?:
""
),
...
...
@@ -115,7 +115,7 @@ class ProfilePresenter @Inject constructor(
uriInteractor
.
getInputStream
(
uri
)
}
}
user
?.
username
?.
let
{
view
.
reloadUserAvatar
(
it
)
}
user
?.
username
?.
let
{
view
.
reloadUserAvatar
(
serverUrl
.
avatarUrl
(
it
)
)
}
}
catch
(
exception
:
RocketChatException
)
{
exception
.
message
?.
let
{
view
.
showMessage
(
it
)
...
...
@@ -143,7 +143,7 @@ class ProfilePresenter @Inject constructor(
}
}
user
?.
username
?.
let
{
view
.
reloadUserAvatar
(
it
)
}
user
?.
username
?.
let
{
view
.
reloadUserAvatar
(
serverUrl
.
avatarUrl
(
it
)
)
}
}
catch
(
exception
:
RocketChatException
)
{
exception
.
message
?.
let
{
view
.
showMessage
(
it
)
...
...
@@ -163,7 +163,7 @@ class ProfilePresenter @Inject constructor(
user
?.
id
?.
let
{
id
->
retryIO
{
client
.
resetAvatar
(
id
)
}
}
user
?.
username
?.
let
{
view
.
reloadUserAvatar
(
it
)
}
user
?.
username
?.
let
{
view
.
reloadUserAvatar
(
serverUrl
.
avatarUrl
(
it
)
)
}
}
catch
(
exception
:
RocketChatException
)
{
exception
.
message
?.
let
{
view
.
showMessage
(
it
)
...
...
@@ -198,4 +198,4 @@ class ProfilePresenter @Inject constructor(
}
}
}
}
\ No newline at end of file
}
app/src/main/java/chat/rocket/android/settings/ui/SettingsFragment.kt
View file @
d92e3ab2
...
...
@@ -29,7 +29,6 @@ import dagger.android.support.AndroidSupportInjection
import
kotlinx.android.synthetic.main.fragment_settings.*
import
timber.log.Timber
import
javax.inject.Inject
import
android.net.Uri
internal
const
val
TAG_SETTINGS_FRAGMENT
=
"SettingsFragment"
...
...
app/src/main/res/values-ru-rRU/strings.xml
View file @
d92e3ab2
...
...
@@ -332,7 +332,7 @@
<string
name=
"message_room_changed_privacy"
>
Тип канала изменен на: %1$s пользователем %2$s
</string>
<!-- User Details -->
<string
name=
"timezone"
>
Часовой пояс
e
</string>
<string
name=
"timezone"
>
Часовой пояс
</string>
<!-- Report -->
<string
name=
"submit"
>
Отправить
</string>
...
...
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