Commit b00237ca authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Update AbstractChatRoomFragment.java

parent 81d61b2f
......@@ -33,23 +33,27 @@ abstract class AbstractChatRoomFragment extends AbstractFragment {
roomToolbar.showPublicChannelIcon();
}
protected void showToolbarUserStatuslIcon(String status) {
switch (status) {
case User.STATUS_ONLINE:
roomToolbar.showUserStatusIcon(RoomToolbar.STATUS_ONLINE);
break;
case User.STATUS_BUSY:
roomToolbar.showUserStatusIcon(RoomToolbar.STATUS_BUSY);
break;
case User.STATUS_AWAY:
roomToolbar.showUserStatusIcon(RoomToolbar.STATUS_AWAY);
break;
case User.STATUS_OFFLINE:
roomToolbar.showUserStatusIcon(RoomToolbar.STATUS_OFFLINE);
break;
default:
roomToolbar.showUserStatusIcon(RoomToolbar.STATUS_OFFLINE);
break;
protected void showToolbarUserStatuslIcon(@Nullable String status) {
if (status == null) {
roomToolbar.showUserStatusIcon(RoomToolbar.STATUS_OFFLINE);
} else {
switch (status) {
case User.STATUS_ONLINE:
roomToolbar.showUserStatusIcon(RoomToolbar.STATUS_ONLINE);
break;
case User.STATUS_BUSY:
roomToolbar.showUserStatusIcon(RoomToolbar.STATUS_BUSY);
break;
case User.STATUS_AWAY:
roomToolbar.showUserStatusIcon(RoomToolbar.STATUS_AWAY);
break;
case User.STATUS_OFFLINE:
roomToolbar.showUserStatusIcon(RoomToolbar.STATUS_OFFLINE);
break;
default:
roomToolbar.showUserStatusIcon(RoomToolbar.STATUS_OFFLINE);
break;
}
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment