diff options
author | steckbrief <steckbrief@chefmail.de> | 2017-08-06 01:15:13 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2017-08-06 01:15:13 +0200 |
commit | 867afe4c5b888ce3f4f9a867906cc8edb86e7aba (patch) | |
tree | 82d17b5fcb4471ae884a548fa815a653cb00e000 /src/main/java/de/thedevstack/conversationsplus/ui/adapter/ListItemAdapter.java | |
parent | 6f588444a953a54543661f7603d45a9093b7196a (diff) |
avatar handling refactored
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/ui/adapter/ListItemAdapter.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/adapter/ListItemAdapter.java b/src/main/java/de/thedevstack/conversationsplus/ui/adapter/ListItemAdapter.java index a67f5bcd..49d88712 100644 --- a/src/main/java/de/thedevstack/conversationsplus/ui/adapter/ListItemAdapter.java +++ b/src/main/java/de/thedevstack/conversationsplus/ui/adapter/ListItemAdapter.java @@ -19,10 +19,11 @@ import java.util.List; import java.util.concurrent.RejectedExecutionException; import de.thedevstack.conversationsplus.ConversationsPlusPreferences; +import de.thedevstack.conversationsplus.services.avatar.AvatarCache; import de.tzur.conversations.Settings; import de.thedevstack.conversationsplus.R; import de.thedevstack.conversationsplus.entities.ListItem; -import de.thedevstack.conversationsplus.services.AvatarService; +import de.thedevstack.conversationsplus.services.avatar.AvatarService; import de.thedevstack.conversationsplus.ui.XmppActivity; import de.thedevstack.conversationsplus.utils.UIHelper; @@ -111,7 +112,7 @@ public class ListItemAdapter extends ArrayAdapter<ListItem> { @Override protected Bitmap doInBackground(ListItem... params) { - return AvatarService.getInstance().get(params[0], activity.getPixel(48)); + return AvatarCache.get(params[0], activity.getPixel(48)); } @Override @@ -128,7 +129,7 @@ public class ListItemAdapter extends ArrayAdapter<ListItem> { public void loadAvatar(ListItem item, ImageView imageView) { if (cancelPotentialWork(item, imageView)) { - final Bitmap bm = AvatarService.getInstance().get(item,activity.getPixel(48),true); + final Bitmap bm = AvatarCache.get(item,activity.getPixel(48),true); if (bm != null) { imageView.setImageBitmap(bm); imageView.setBackgroundColor(0x00000000); |