When games moved, the destination group is opened and the games that

were moved stay selected.
This commit is contained in:
Eric House 2013-10-23 20:45:14 -07:00
parent 8f8911c7d1
commit 788542c874
3 changed files with 5 additions and 5 deletions

View file

@ -234,6 +234,7 @@ public class GameListAdapter implements ExpandableListAdapter {
GameListItem result = GameListItem result =
GameListItem.makeForRow( m_context, rowid, m_handler, GameListItem.makeForRow( m_context, rowid, m_handler,
groupPosition, m_fieldID, m_cb ); groupPosition, m_fieldID, m_cb );
result.setSelected( m_cb.getSelected( result ) );
return result; return result;
} }

View file

@ -337,10 +337,6 @@ public class GameListItem extends LinearLayout
s_invalRows.remove( m_rowid ); s_invalRows.remove( m_rowid );
} }
} }
if ( m_cb.getSelected( GameListItem.this ) && m_selected ) {
toggleSelected();
}
} }
} // class LoadItemTask } // class LoadItemTask

View file

@ -301,6 +301,8 @@ public class GamesList extends XWExpandableListActivity
for ( long rowid : m_rowids ) { for ( long rowid : m_rowids ) {
DBUtils.moveGame( GamesList.this, rowid, gid ); DBUtils.moveGame( GamesList.this, rowid, gid );
} }
DBUtils.setGroupExpanded( GamesList.this, gid,
true );
onContentChanged(); onContentChanged();
} }
}; };
@ -631,7 +633,7 @@ public class GamesList extends XWExpandableListActivity
@Override @Override
public void onBackPressed() { public void onBackPressed() {
if ( 0 == m_selGames.size() ) { if ( 0 == m_selGames.size() && 0 == m_selGroupIDs.size() ) {
super.onBackPressed(); super.onBackPressed();
} else { } else {
clearSelections(); clearSelections();
@ -796,6 +798,7 @@ public class GamesList extends XWExpandableListActivity
// Game menus // Game menus
case R.id.list_item_move: case R.id.list_item_move:
keepSels = true;
if ( 1 >= m_adapter.getGroupCount() ) { if ( 1 >= m_adapter.getGroupCount() ) {
showOKOnlyDialog( R.string.no_move_onegroup ); showOKOnlyDialog( R.string.no_move_onegroup );
} else { } else {