am 886d32ed: am 1b01ea1c: am 67d11994: am 23f0740f: Merge "Be less brutal about updating the conversation view" into ub-gmail-ur14-dev
* commit '886d32edb516676cec88f23000c3c10021c01ba1':
Be less brutal about updating the conversation view
diff --git a/src/com/android/mail/browse/ConversationMessage.java b/src/com/android/mail/browse/ConversationMessage.java
index 2ac40ee..cabffc5 100644
--- a/src/com/android/mail/browse/ConversationMessage.java
+++ b/src/com/android/mail/browse/ConversationMessage.java
@@ -77,7 +77,7 @@
*
*/
public int getStateHashCode() {
- return Objects.hashCode(uri, read, starred, getAttachmentsStateHashCode());
+ return Objects.hashCode(uri, getAttachmentsStateHashCode());
}
private int getAttachmentsStateHashCode() {
diff --git a/src/com/android/mail/ui/ConversationViewFragment.java b/src/com/android/mail/ui/ConversationViewFragment.java
index 3e68841..e425e78 100644
--- a/src/com/android/mail/ui/ConversationViewFragment.java
+++ b/src/com/android/mail/ui/ConversationViewFragment.java
@@ -1649,7 +1649,9 @@
// We are going to update the data in the adapter whenever any input fields change.
// This ensures that the Message object that ComposeActivity uses will be correctly
// aligned with the most up-to-date data.
- if (!newMsg.isEqual(oldMsg)) {
+ // Note that isEqual does not compare all fields in the Message object
+ if (!newMsg.isEqual(oldMsg) ||
+ newMsg.read != oldMsg.read || newMsg.starred != oldMsg.starred) {
mAdapter.updateItemsForMessage(newMsg, changedOverlayPositions);
LogUtils.i(LOG_TAG, "msg #%d (%d): detected field(s) change. sendingState=%s",
pos, newMsg.id, newMsg.sendingState);