From b07fd2699ca4404d688e45bc42307d7a5bb1a4a3 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 8 Apr 2017 11:40:54 -0700 Subject: [PATCH] remove incorrect assertion DELETE_DICT Action is expected to flow through child, at least until I fix to disable deleting a dict while it's open in the dict browser. It may be confusing but with the assert gone does no harm. --- .../eehouse/android/xw4/DictBrowseDelegate.java | 16 +++++++++++++--- .../org/eehouse/android/xw4/DictsDelegate.java | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DictBrowseDelegate.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DictBrowseDelegate.java index e40bc856d..000b1e2c8 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DictBrowseDelegate.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DictBrowseDelegate.java @@ -302,9 +302,19 @@ public class DictBrowseDelegate extends DelegateBase @Override public boolean onPosButton( Action action, Object[] params ) { - Assert.assertTrue( !BuildConfig.DEBUG || Action.FINISH_ACTION==action ); - finish(); - return true; + boolean handled = false; + switch( action ) { + case DELETE_DICT_ACTION: + // This comes in from parent + break; + case FINISH_ACTION: + handled = true; + finish(); + break; + default: + Assert.assertTrue( !BuildConfig.DEBUG ); + } + return handled; } private void findButtonClicked() diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DictsDelegate.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DictsDelegate.java index bffe2cb9b..8bc80bb66 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DictsDelegate.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DictsDelegate.java @@ -622,7 +622,7 @@ public class DictsDelegate extends ListDelegateBase boolean handled = true; switch ( item.getItemId() ) { - case R.id.dicts_delete: + case R.id.dicts_delete: // ideally, disable me when dictbrowse open deleteSelected(); break; case R.id.dicts_move: