launch networked rematch games on creation, not just local ones

This commit is contained in:
Eric House 2015-12-21 16:42:54 -08:00
parent f7df11b923
commit 6677a3e402

View file

@ -2039,18 +2039,19 @@ public class GamesListDelegate extends ListDelegateBase
int bits = intent.getIntExtra( REMATCH_ADDRS_EXTRA, -1 ); int bits = intent.getIntExtra( REMATCH_ADDRS_EXTRA, -1 );
CommsConnTypeSet addrs = new CommsConnTypeSet( bits ); CommsConnTypeSet addrs = new CommsConnTypeSet( bits );
long newid;
if ( null == btAddr && null == phone && null == relayID ) { if ( null == btAddr && null == phone && null == relayID ) {
long newid = GameUtils.dupeGame( m_activity, srcRowID ); newid = GameUtils.dupeGame( m_activity, srcRowID );
DBUtils.setName( m_activity, newid, gameName ); DBUtils.setName( m_activity, newid, gameName );
launchGame( newid );
} else { } else {
long groupID = DBUtils.getGroupForGame( m_activity, srcRowID ); long groupID = DBUtils.getGroupForGame( m_activity, srcRowID );
long newid = GameUtils.makeNewMultiGame( m_activity, groupID, newid = GameUtils.makeNewMultiGame( m_activity, groupID,
dict, lang, dict, lang,
addrs, gameName ); addrs, gameName );
DBUtils.addRematchInfo( m_activity, newid, btAddr, phone, DBUtils.addRematchInfo( m_activity, newid, btAddr, phone,
relayID ); relayID );
} }
launchGame( newid );
} }
m_rematchIntent = null; m_rematchIntent = null;
} }