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
82066d2f
Commit
82066d2f
authored
Aug 22, 2017
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update RoomFragment.java
parent
82675694
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
12 deletions
+30
-12
RoomFragment.java
...a/chat/rocket/android/fragment/chatroom/RoomFragment.java
+30
-12
No files found.
app/src/main/java/chat/rocket/android/fragment/chatroom/RoomFragment.java
View file @
82066d2f
...
...
@@ -22,6 +22,7 @@ import android.support.v7.widget.RecyclerView;
import
android.view.View
;
import
android.view.ViewGroup
;
import
chat.rocket.core.models.User
;
import
java.lang.reflect.Field
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -524,17 +525,7 @@ public class RoomFragment extends AbstractChatRoomFragment implements
}
@Override
public
void
render
(
Room
room
)
{
String
type
=
room
.
getType
();
if
(
Room
.
TYPE_CHANNEL
.
equals
(
type
))
{
setToolbarRoomIcon
(
R
.
drawable
.
ic_hashtag_gray_24dp
);
}
else
if
(
Room
.
TYPE_PRIVATE
.
equals
(
type
))
{
setToolbarRoomIcon
(
R
.
drawable
.
ic_lock_gray_24dp
);
}
else
if
(
Room
.
TYPE_DIRECT_MESSAGE
.
equals
(
type
))
{
setToolbarRoomIcon
(
R
.
drawable
.
ic_at_gray_24dp
);
}
else
{
setToolbarRoomIcon
(
0
);
}
public
void
render
(
Room
room
,
@Nullable
User
user
)
{
setToolbarTitle
(
room
.
getName
());
boolean
unreadMessageExists
=
room
.
isAlert
();
...
...
@@ -542,6 +533,33 @@ public class RoomFragment extends AbstractChatRoomFragment implements
newMessageIndicatorManager
.
reset
();
}
previousUnreadMessageExists
=
unreadMessageExists
;
if
(
room
.
isChannel
())
{
setToolbarRoomIcon
(
R
.
drawable
.
ic_hashtag_opaque_black_24dp
);
return
;
}
if
(
room
.
isPrivate
())
{
setToolbarRoomIcon
(
R
.
drawable
.
ic_padlock_opaque_black_24dp
);
return
;
}
if
(
user
!=
null
)
{
switch
(
user
.
getStatus
())
{
case
User
.
STATUS_ONLINE
:
setToolbarRoomIcon
(
R
.
drawable
.
ic_at_online_24dp
);
break
;
case
User
.
STATUS_AWAY
:
setToolbarRoomIcon
(
R
.
drawable
.
ic_at_away_24dp
);
break
;
case
User
.
STATUS_BUSY
:
setToolbarRoomIcon
(
R
.
drawable
.
ic_at_bush_24dp
);
break
;
default
:
setToolbarRoomIcon
(
R
.
drawable
.
ic_at_opaque_black_24dp
);
break
;
}
}
}
@Override
...
...
@@ -602,4 +620,4 @@ public class RoomFragment extends AbstractChatRoomFragment implements
edittingMessage
=
message
;
messageFormManager
.
setEditMessage
(
message
.
getMessage
());
}
}
\ 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