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
63c8303c
Commit
63c8303c
authored
Apr 19, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates ChatRoomsPresenter.kt
parent
96411414
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
ChatRoomsPresenter.kt
...cket/android/chatrooms/presentation/ChatRoomsPresenter.kt
+17
-11
No files found.
app/src/main/java/chat/rocket/android/chatrooms/presentation/ChatRoomsPresenter.kt
View file @
63c8303c
...
...
@@ -127,10 +127,12 @@ class ChatRoomsPresenter @Inject constructor(
id
=
it
.
id
,
type
=
RoomType
.
DIRECT_MESSAGE
,
user
=
SimpleUser
(
username
=
it
.
username
,
name
=
it
.
name
,
id
=
null
),
status
=
getActiveUsersInteractor
.
getActiveUserByUsername
(
currentServer
,
it
.
name
!!
)
?.
status
,
status
=
if
(
it
.
name
!=
null
)
{
getActiveUsersInteractor
.
getActiveUserByUsername
(
currentServer
,
it
.
name
!!
)
?.
status
}
else
{
null
},
name
=
it
.
name
?:
""
,
fullName
=
it
.
name
,
readonly
=
false
,
...
...
@@ -158,10 +160,12 @@ class ChatRoomsPresenter @Inject constructor(
id
=
it
.
id
,
type
=
it
.
type
,
user
=
it
.
user
,
status
=
getActiveUsersInteractor
.
getActiveUserByUsername
(
currentServer
,
it
.
name
!!
)
?.
status
,
status
=
if
(
it
.
name
!=
null
)
{
getActiveUsersInteractor
.
getActiveUserByUsername
(
currentServer
,
it
.
name
!!
)
?.
status
}
else
{
null
},
name
=
it
.
name
?:
""
,
fullName
=
it
.
fullName
,
readonly
=
it
.
readonly
,
...
...
@@ -392,7 +396,7 @@ class ChatRoomsPresenter @Inject constructor(
user
=
room
.
user
?:
user
,
status
=
getActiveUsersInteractor
.
getActiveUserByUsername
(
currentServer
,
room
.
name
!!
room
.
name
?:
name
)
?.
status
,
name
=
room
.
name
?:
name
,
fullName
=
room
.
fullName
?:
fullName
,
...
...
@@ -471,8 +475,10 @@ class ChatRoomsPresenter @Inject constructor(
private
suspend
fun
subscribeActiveUsers
()
{
manager
.
addActiveUserChannel
(
activeUserChannel
)
for
(
user
in
activeUserChannel
)
{
processActiveUser
(
user
)
launch
(
CommonPool
+
strategy
.
jobs
)
{
for
(
user
in
activeUserChannel
)
{
processActiveUser
(
user
)
}
}
}
...
...
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