From 54633a4e1626cb7bfb884a2ccb678b7cfec177d3 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Thu, 12 Aug 2010 02:22:08 +0000 Subject: [PATCH] Improvements to "more from this sender" - hopefully this should search only on actual addresses, not their local parts. --- src/com/fsck/k9/activity/MessageList.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/com/fsck/k9/activity/MessageList.java b/src/com/fsck/k9/activity/MessageList.java index f07f9d676..e33c5df68 100644 --- a/src/com/fsck/k9/activity/MessageList.java +++ b/src/com/fsck/k9/activity/MessageList.java @@ -1587,7 +1587,7 @@ public class MessageList case R.id.same_sender: { MessageList.actionHandle(MessageList.this, - "From "+holder.sender, holder.sender, true, + "From "+holder.sender, holder.senderAddress, true, null, null); break; } @@ -2480,6 +2480,7 @@ public class MessageList public Date compareDate; public String compareSubject; public String sender; + public String senderAddress; public String compareCounterparty; public String preview; public String[] recipients; @@ -2557,6 +2558,17 @@ public class MessageList this.compareCounterparty = this.sender; } + if (addrs.length > 0) + { + this.senderAddress = addrs[0].getAddress(); + } + else + { + // a reasonable fallback "whomever we were corresponding with + this.senderAddress = this.compareCounterparty; + } + + this.subject = message.getSubject(); this.uid = message.getUid();