From 57a3eccc0e40955d12be00024e318fa7a45f4f60 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Mon, 21 Dec 2015 00:48:44 +0100 Subject: [PATCH] compose: use position as item id for recipients --- .../java/com/fsck/k9/activity/AlternateRecipientAdapter.java | 5 +---- .../src/main/java/com/fsck/k9/activity/RecipientAdapter.java | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/k9mail/src/main/java/com/fsck/k9/activity/AlternateRecipientAdapter.java b/k9mail/src/main/java/com/fsck/k9/activity/AlternateRecipientAdapter.java index ed3b05212..5e37cda19 100644 --- a/k9mail/src/main/java/com/fsck/k9/activity/AlternateRecipientAdapter.java +++ b/k9mail/src/main/java/com/fsck/k9/activity/AlternateRecipientAdapter.java @@ -66,10 +66,7 @@ public class AlternateRecipientAdapter extends BaseAdapter { @Override public long getItemId(int position) { - if (position == 0 || position == 1) { - return currentRecipient.hashCode(); - } - return recipients.get(position -2).hashCode(); + return position; } @Override diff --git a/k9mail/src/main/java/com/fsck/k9/activity/RecipientAdapter.java b/k9mail/src/main/java/com/fsck/k9/activity/RecipientAdapter.java index fdc350409..add62df10 100644 --- a/k9mail/src/main/java/com/fsck/k9/activity/RecipientAdapter.java +++ b/k9mail/src/main/java/com/fsck/k9/activity/RecipientAdapter.java @@ -49,7 +49,7 @@ public class RecipientAdapter extends BaseAdapter implements Filterable { @Override public long getItemId(int position) { - return recipients.get(position).hashCode(); + return position; } @Override