Commit dfec623b authored by Tiago Cunha's avatar Tiago Cunha

Removed view data chache

parent ee2e7b5d
......@@ -82,10 +82,6 @@ public class Avatar {
* render avatar into RocketChatAvatar.
*/
public void into(final RocketChatAvatar rocketChatAvatar) {
if (ViewDataCache.isStored(username, rocketChatAvatar)) {
return;
}
final Context context = rocketChatAvatar.getContext();
rocketChatAvatar.loadImage(getImageUrl(), getTextDrawable(context));
}
......
package chat.rocket.android.helper;
import android.view.View;
/**
* save String to setTag.
*/
public class ViewDataCache {
/**
* stores str if not stored. returns true if already stored.
*/
public static boolean isStored(String str, View view) {
if (view.getTag() != null && view.getTag() instanceof String
&& ((String) view.getTag()).equals(str)) {
return true;
}
view.setTag(str);
return false;
}
}
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