-
Notifications
You must be signed in to change notification settings - Fork 246
Fixes #381: Removes picasso library and uses glide library instead #384
base: master
Are you sure you want to change the base?
Conversation
Automated message from Dropbox CLA bot @saketkumar95, it looks like you've already signed the Dropbox CLA. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sam1301 Check. It works fine now. :) |
@@ -120,7 +122,7 @@ public void onItemClick(int viewId, int position) { | |||
Person[] recipientArray = messageHeaderParent.getRecipients(zulipApp); | |||
narrowListener.onNarrow(new NarrowFilterPM(Arrays.asList(recipientArray)), | |||
messageHeaderParent.getMessageId()); | |||
narrowListener.onNarrowFillSendBoxPrivate(recipientArray,false); | |||
narrowListener.onNarrowFillSendBoxPrivate(recipientArray, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this change!
@@ -395,7 +397,7 @@ public void onBindViewHolder(final RecyclerView.ViewHolder holder, final int pos | |||
public void onClick(View view) { | |||
Intent i = new Intent(zulipApp.getApplicationContext(), PhotoViewActivity.class); | |||
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | |||
i.putExtra(Intent.EXTRA_TEXT , url); | |||
i.putExtra(Intent.EXTRA_TEXT, url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this chagne!
int hMapKey = message.getSender().getId(); | ||
int avatarColor; | ||
|
||
// check if current sender has already been allotted a randomly generated color |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these empty lines!
@Override | ||
public void onSuccess() { | ||
public boolean onException(Exception e, String model, Target<GlideDrawable> target, boolean isFirstResource) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about displaying the default gravatar in this onException ?
And using a placeholder like before?
As this method will be called on every onBindViewHolder so we need to make sure these are taking minimal time!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far i know, to display an error placeholder default Avatar the onException method must return false.
Check out this https://futurestud.io/tutorials/glide-exceptions-debugging-and-error-handling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's fine but see this we are initiating defaultAvatar even if the gravatar is loaded which is not needed, hence we can display the default blank (solid coloured square) only when an error is occurred!
@saketkumar95 this looks nice! Can you please address Kunal's comment here? |
Summary of changes
This PR fixes https://github.com/zulip/zulip-android/issues/381
Removed picasso and used glide in place of picasso.
Code is formatted.
Run the lint tests with
./gradlew lintDebug
and make sure BUILD is SUCCESSFULCommit messages are well-written.