diff options
author | Andrew Sapperstein <asapperstein@google.com> | 2014-03-26 19:55:01 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-03-26 19:55:01 +0000 |
commit | 24692907a05ddee8f9fe548ce516b08455487e93 (patch) | |
tree | dfb315614fbdb0eaca12a611f22ec45f68f06ee6 /src | |
parent | e9db4c0023f080943184758c607551d5d3ea13bb (diff) | |
parent | 1165d291b938f406631768795c0dbee58898315e (diff) | |
download | android_packages_apps_UnifiedEmail-24692907a05ddee8f9fe548ce516b08455487e93.tar.gz android_packages_apps_UnifiedEmail-24692907a05ddee8f9fe548ce516b08455487e93.tar.bz2 android_packages_apps_UnifiedEmail-24692907a05ddee8f9fe548ce516b08455487e93.zip |
Merge "Commit DestructiveActions immediately. b/9904716." into ub-mail-master
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/mail/ui/AbstractActivityController.java | 17 | ||||
-rw-r--r-- | src/com/android/mail/ui/AnimatedAdapter.java | 4 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/com/android/mail/ui/AbstractActivityController.java b/src/com/android/mail/ui/AbstractActivityController.java index d075ca05c..9ec78f062 100644 --- a/src/com/android/mail/ui/AbstractActivityController.java +++ b/src/com/android/mail/ui/AbstractActivityController.java @@ -1978,6 +1978,23 @@ public abstract class AbstractActivityController implements ActivityController, if (!showNextConversation(target, operation)) { // This method will be called again if the user selects an autoadvance option + + // HACKFIX around b/9904716. We were not properly performing the last + // DestructiveAction. A proper fix probably involves rewriting + // the logic for animating changes in the list as well as undo + // and probably batch DestructiveActions. The change is limited to + // tablets where the issue occurs. + final ConversationListFragment convListFragment = getConversationListFragment(); + if (mIsTablet && convListFragment != null) { + convListFragment.getAnimatedAdapter().setNextAction( + new SwipeableListView.ListItemsRemovedListener() { + @Override + public void onListItemsRemoved() { + action.performAction(); + } + } + ); + } return; } // If the conversation is in the selected set, remove it from the set. diff --git a/src/com/android/mail/ui/AnimatedAdapter.java b/src/com/android/mail/ui/AnimatedAdapter.java index 866c0e5f9..affba1030 100644 --- a/src/com/android/mail/ui/AnimatedAdapter.java +++ b/src/com/android/mail/ui/AnimatedAdapter.java @@ -867,6 +867,10 @@ public class AnimatedAdapter extends SimpleCursorAdapter { mPendingDestruction = next; } + /* package */ void setNextAction(ListItemsRemovedListener next) { + mPendingDestruction = next; + } + private void updateAnimatingConversationItems(Object obj, HashSet<Long> items) { if (!items.isEmpty()) { if (obj instanceof ConversationItemView) { |