From feb9510b9d7df8835de078b4bad222714e343205 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sun, 10 Aug 2014 15:42:43 -0700 Subject: [PATCH] deselect games in group when it's collapsed --- .../src/org/eehouse/android/xw4/GamesListDelegate.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListDelegate.java index 0e802ce98..2b0c4d7be 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListDelegate.java @@ -1356,6 +1356,15 @@ public class GamesListDelegate extends ListDelegateBase DBUtils.setGroupExpanded( m_activity, groupID, expanded ); m_adapter.setExpanded( groupID, expanded ); + + // Deselect any games that are being hidden. + if ( !expanded ) { + long[] rows = DBUtils.getGroupGames( m_activity, groupID ); + for ( long row : rows ) { + m_selGames.remove( row ); + } + setTitleBar(); + } } private void setTitleBar()