diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-12-07 21:14:13 +0100 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-12-07 21:14:13 +0100 |
commit | 490f40b19685e740c5a106bba1302d13848aaf21 (patch) | |
tree | d5a9c74e6c1373f2d978fa432df06efbba9b59ea /src/main | |
parent | 8616a62b3a76eaf93feff3ebb2e33ab259ce0f79 (diff) |
possible work around for some weird - possibly sdk - bugs
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java index e3265a272..60046468a 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -343,7 +343,7 @@ public class MessageAdapter extends ArrayAdapter<Message> { final Message message = getItem(position); final Conversation conversation = message.getConversation(); final Account account = conversation.getAccount(); - int type = getItemViewType(position); + final int type = getItemViewType(position); ViewHolder viewHolder; if (view == null) { viewHolder = new ViewHolder(); @@ -371,7 +371,6 @@ public class MessageAdapter extends ArrayAdapter<Message> { .findViewById(R.id.message_time); viewHolder.indicatorReceived = (ImageView) view .findViewById(R.id.indicator_received); - view.setTag(viewHolder); break; case RECEIVED: view = activity.getLayoutInflater().inflate( @@ -392,21 +391,23 @@ public class MessageAdapter extends ArrayAdapter<Message> { .findViewById(R.id.message_time); viewHolder.indicatorReceived = (ImageView) view .findViewById(R.id.indicator_received); - view.setTag(viewHolder); break; case STATUS: view = activity.getLayoutInflater().inflate( R.layout.message_status, parent, false); viewHolder.contact_picture = (ImageView) view .findViewById(R.id.message_photo); - view.setTag(viewHolder); break; default: viewHolder = null; break; } + view.setTag(viewHolder); } else { viewHolder = (ViewHolder) view.getTag(); + if (viewHolder == null) { + return view; + } } if (type == STATUS) { |