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
1a6b375c
Commit
1a6b375c
authored
Jul 19, 2017
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update methods removing unnecessary parameters.
parent
7d35b2ac
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
9 deletions
+7
-9
SidebarMainFragment.java
.../rocket/android/fragment/sidebar/SidebarMainFragment.java
+1
-1
RoomUserAdapter.java
...android/layouthelper/chatroom/dialog/RoomUserAdapter.java
+2
-2
SuggestUserAdapter.java
...droid/layouthelper/sidebar/dialog/SuggestUserAdapter.java
+2
-4
UserRenderer.java
.../main/java/chat/rocket/android/renderer/UserRenderer.java
+2
-2
No files found.
app/src/main/java/chat/rocket/android/fragment/sidebar/SidebarMainFragment.java
View file @
1a6b375c
...
...
@@ -225,7 +225,7 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain
private
void
onRenderCurrentUser
(
User
user
,
RocketChatAbsoluteUrl
absoluteUrl
)
{
if
(
user
!=
null
&&
absoluteUrl
!=
null
)
{
new
UserRenderer
(
getContext
(),
user
)
.
avatarInto
(
rootView
.
findViewById
(
R
.
id
.
current_user_avatar
),
absoluteUrl
,
false
)
.
avatarInto
(
rootView
.
findViewById
(
R
.
id
.
current_user_avatar
),
absoluteUrl
)
.
usernameInto
(
rootView
.
findViewById
(
R
.
id
.
current_user_name
))
.
statusColorInto
(
rootView
.
findViewById
(
R
.
id
.
current_user_status
));
}
...
...
app/src/main/java/chat/rocket/android/layouthelper/chatroom/dialog/RoomUserAdapter.java
View file @
1a6b375c
...
...
@@ -58,12 +58,12 @@ public class RoomUserAdapter extends RecyclerView.Adapter<RoomUserViewHolder> {
.
setUtcOffset
(
0
)
.
build
();
new
UserRenderer
(
context
,
user
)
.
avatarInto
(
holder
.
avatar
,
absoluteUrl
,
false
)
.
avatarInto
(
holder
.
avatar
,
absoluteUrl
)
.
usernameInto
(
holder
.
username
);
}
else
{
new
UserRenderer
(
context
,
realmUser
.
asUser
())
.
statusColorInto
(
holder
.
status
)
.
avatarInto
(
holder
.
avatar
,
absoluteUrl
,
false
)
.
avatarInto
(
holder
.
avatar
,
absoluteUrl
)
.
usernameInto
(
holder
.
username
);
}
}
...
...
app/src/main/java/chat/rocket/android/layouthelper/sidebar/dialog/SuggestUserAdapter.java
View file @
1a6b375c
...
...
@@ -2,7 +2,6 @@ package chat.rocket.android.layouthelper.sidebar.dialog;
import
android.content.Context
;
import
android.view.View
;
import
android.widget.ImageView
;
import
java.util.Iterator
;
import
java.util.List
;
...
...
@@ -11,7 +10,6 @@ import chat.rocket.android.widget.AbsoluteUrl;
import
chat.rocket.persistence.realm.models.ddp.RealmUser
;
import
chat.rocket.persistence.realm.RealmAutoCompleteAdapter
;
import
chat.rocket.android.renderer.UserRenderer
;
import
chat.rocket.android.widget.RocketChatAvatar
;
/**
* adapter to suggest user names.
...
...
@@ -27,8 +25,8 @@ public class SuggestUserAdapter extends RealmAutoCompleteAdapter<RealmUser> {
@Override
protected
void
onBindItemView
(
View
itemView
,
RealmUser
user
)
{
new
UserRenderer
(
itemView
.
getContext
(),
user
.
asUser
())
.
statusColorInto
(
(
ImageView
)
itemView
.
findViewById
(
R
.
id
.
room_user_status
))
.
avatarInto
(
(
RocketChatAvatar
)
itemView
.
findViewById
(
R
.
id
.
room_user_avatar
),
absoluteUrl
,
false
);
.
statusColorInto
(
itemView
.
findViewById
(
R
.
id
.
room_user_status
))
.
avatarInto
(
itemView
.
findViewById
(
R
.
id
.
room_user_avatar
),
absoluteUrl
);
}
@Override
...
...
app/src/main/java/chat/rocket/android/renderer/UserRenderer.java
View file @
1a6b375c
...
...
@@ -21,14 +21,14 @@ public class UserRenderer extends AbstractRenderer<User> {
/**
* show Avatar image
*/
public
UserRenderer
avatarInto
(
RocketChatAvatar
rocketChatAvatar
,
AbsoluteUrl
absoluteUrl
,
boolean
showFailureImage
)
{
public
UserRenderer
avatarInto
(
RocketChatAvatar
rocketChatAvatar
,
AbsoluteUrl
absoluteUrl
)
{
if
(!
shouldHandle
(
rocketChatAvatar
))
{
return
this
;
}
if
(!
TextUtils
.
isEmpty
(
object
.
getUsername
()))
{
new
Avatar
(
absoluteUrl
,
object
.
getUsername
())
.
into
(
rocketChatAvatar
,
showFailureImage
);
.
into
(
rocketChatAvatar
);
}
return
this
;
}
...
...
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