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
8088bf55
Commit
8088bf55
authored
Jan 23, 2017
by
Tiago Cunha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PMD fixes
parent
6c14cdd1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Avatar.java
app/src/main/java/chat/rocket/android/helper/Avatar.java
+5
-5
No files found.
app/src/main/java/chat/rocket/android/helper/Avatar.java
View file @
8088bf55
...
@@ -30,16 +30,16 @@ public class Avatar {
...
@@ -30,16 +30,16 @@ public class Avatar {
};
};
private
final
String
hostname
;
private
final
String
hostname
;
private
final
String
username
;
private
final
String
username
;
private
final
String
avatar
;
private
final
String
avatar
Url
;
public
Avatar
(
String
hostname
,
String
username
)
{
public
Avatar
(
String
hostname
,
String
username
)
{
this
(
hostname
,
username
,
null
);
this
(
hostname
,
username
,
null
);
}
}
public
Avatar
(
String
hostname
,
String
username
,
String
avatar
)
{
public
Avatar
(
String
hostname
,
String
username
,
String
avatar
Url
)
{
this
.
hostname
=
hostname
;
this
.
hostname
=
hostname
;
this
.
username
=
username
;
this
.
username
=
username
;
this
.
avatar
=
avatar
;
this
.
avatar
Url
=
avatarUrl
;
}
}
private
static
int
getColorForUser
(
String
username
)
{
private
static
int
getColorForUser
(
String
username
)
{
...
@@ -82,7 +82,7 @@ public class Avatar {
...
@@ -82,7 +82,7 @@ public class Avatar {
private
String
getImageUrl
()
{
private
String
getImageUrl
()
{
//from Rocket.Chat:packages/rocketchat-ui/lib/avatar.coffee
//from Rocket.Chat:packages/rocketchat-ui/lib/avatar.coffee
//REMARK! this is often SVG image! (see: Rocket.Chat:server/startup/avatar.coffee)
//REMARK! this is often SVG image! (see: Rocket.Chat:server/startup/avatar.coffee)
if
(
TextUtils
.
isEmpty
(
avatar
))
{
if
(
TextUtils
.
isEmpty
(
avatar
Url
))
{
try
{
try
{
return
"https://"
+
hostname
+
"/avatar/"
+
URLEncoder
.
encode
(
username
,
"UTF-8"
)
+
".jpg"
;
return
"https://"
+
hostname
+
"/avatar/"
+
URLEncoder
.
encode
(
username
,
"UTF-8"
)
+
".jpg"
;
}
catch
(
UnsupportedEncodingException
exception
)
{
}
catch
(
UnsupportedEncodingException
exception
)
{
...
@@ -90,7 +90,7 @@ public class Avatar {
...
@@ -90,7 +90,7 @@ public class Avatar {
return
null
;
return
null
;
}
}
}
else
{
}
else
{
return
avatar
;
return
avatar
Url
;
}
}
}
}
...
...
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