From 3ae2b41ae2d7fb543cd202b1621186895fa8997b Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 1 Feb 2017 06:08:33 -0800 Subject: [PATCH] save selected games/groups across rotations --- .../java/org/eehouse/android/xw4/GamesListDelegate.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java index 9139a0f82..39c21a016 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java @@ -84,6 +84,8 @@ public class GamesListDelegate extends ListDelegateBase private static final String SAVE_DICTNAMES = "SAVE_DICTNAMES"; private static final String SAVE_NEXTSOLO = "SAVE_NEXTSOLO"; private static final String SAVE_REMATCHEXTRAS = "SAVE_REMATCHEXTRAS"; + private static final String SAVE_SELGAMES = "SAVE_SELGAMES"; + private static final String SAVE_SELGROUPS = "SAVE_SELGROUPS"; private static final String RELAYIDS_EXTRA = "relayids"; private static final String ROWID_EXTRA = "rowid"; @@ -1045,6 +1047,8 @@ public class GamesListDelegate extends ListDelegateBase outState.putLong( SAVE_GROUPID, m_groupid ); outState.putString( SAVE_DICTNAMES, m_missingDictName ); outState.putBoolean( SAVE_NEXTSOLO, m_nextIsSolo ); + outState.putSerializable( SAVE_SELGAMES, (HashSet)m_selGames ); + outState.putSerializable( SAVE_SELGROUPS, (HashSet)m_selGroupIDs ); if ( null != m_netLaunchInfo ) { m_netLaunchInfo.putSelf( outState ); } @@ -1062,6 +1066,8 @@ public class GamesListDelegate extends ListDelegateBase m_missingDictName = bundle.getString( SAVE_DICTNAMES ); m_nextIsSolo = bundle.getBoolean( SAVE_NEXTSOLO ); m_rematchExtras = bundle.getBundle( SAVE_REMATCHEXTRAS ); + m_selGames = (HashSet)bundle.getSerializable( SAVE_SELGAMES ); + m_selGroupIDs = (HashSet)bundle.getSerializable( SAVE_SELGROUPS ); } }