Skip to content

Commit 795c936

Browse files
committed
Return hash of e-mail in else clause
GravatarUtils guards against an empty string so the check does not need to be duplicated in AvatarLoader
1 parent 86d99ef commit 795c936

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

app/src/main/java/com/github/mobile/util/AvatarLoader.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -327,12 +327,8 @@ private String getId(final User user) {
327327
String gravatarId = user.getGravatarId();
328328
if (!TextUtils.isEmpty(gravatarId))
329329
return gravatarId;
330-
331-
String email = user.getEmail();
332-
if (!TextUtils.isEmpty(email))
333-
return GravatarUtils.getHash(email);
334-
335-
return null;
330+
else
331+
return GravatarUtils.getHash(user.getEmail());
336332
}
337333

338334
/**

0 commit comments

Comments
 (0)