show "Sending..." in an outgoing message header until sent
It mostly just wasn't wired up to Message.isSending.
CVF.processInPlaceUpdates() now looks for sending state changes
and causes affected overlays to re-render.
"Sending..." changes also apply to the snap header, so I
improved how data changes generally propagate to the snap
header. Instead of manually prodding the snap header upon a
change, fix it so dataset changes on the adapter also unbind
the snap header view (to stay consistent w/ non-snap views).
The positioning pass that immediately follows will re-render it.
Bug: 7229688
Change-Id: I72930bfa7ec20788c3e4de67f4b6856a7e6a0bf7
diff --git a/src/com/android/mail/ui/ConversationViewFragment.java b/src/com/android/mail/ui/ConversationViewFragment.java
index 2c38066..ca04a53 100644
--- a/src/com/android/mail/ui/ConversationViewFragment.java
+++ b/src/com/android/mail/ui/ConversationViewFragment.java
@@ -238,7 +238,6 @@
// settings may have been updated; refresh views that are known to
// depend on settings
- mConversationContainer.getSnapHeader().onAccountChanged();
mAdapter.notifyDataSetChanged();
}
@@ -1201,9 +1200,11 @@
final ConversationMessage newMsg = newCursor.getMessage();
final ConversationMessage oldMsg = oldCursor.getMessage();
- if (!TextUtils.equals(newMsg.from, oldMsg.from)) {
+ if (!TextUtils.equals(newMsg.from, oldMsg.from) ||
+ newMsg.isSending != oldMsg.isSending) {
mAdapter.updateItemsForMessage(newMsg);
- LogUtils.i(LOG_TAG, "msg #%d (%d): detected sender change", pos, newMsg.id);
+ LogUtils.i(LOG_TAG, "msg #%d (%d): detected from/sending change. isSending=%s",
+ pos, newMsg.id, newMsg.isSending);
changed = true;
}