don't offer to nfc-invite a SMS game since that doesn't work, and DO a

relay game since that does.
This commit is contained in:
Eric House 2014-09-16 07:41:09 -07:00
parent 9df2d0c1dc
commit e7e04fc2bb

View file

@ -486,9 +486,20 @@ public class BoardDelegate extends DelegateBase
AlertDialog ad = (AlertDialog)dialog; AlertDialog ad = (AlertDialog)dialog;
String message = String message =
getString( R.string.invite_msg_fmt, m_missing ); getString( R.string.invite_msg_fmt, m_missing );
String ps = null;
if ( m_missing > 1 ) { if ( m_missing > 1 ) {
message += getString( R.string.invite_multiple ); ps = getString( R.string.invite_multiple );
} else {
boolean[] avail = NFCUtils.nfcAvail( m_activity );
if ( avail[1] ) {
ps = getString( R.string.invite_if_nfc );
}
} }
if ( null != ps ) {
message += "\n\n" + ps;
}
ad.setMessage( message ); ad.setMessage( message );
break; break;
} }
@ -1651,9 +1662,11 @@ public class BoardDelegate extends DelegateBase
String msg = getString( R.string.invite_msg_fmt, String msg = getString( R.string.invite_msg_fmt,
nMissingPlayers ); nMissingPlayers );
boolean[] avail = NFCUtils.nfcAvail( m_activity ); if ( Action.BT_PICK_ACTION == faction ) {
if ( avail[1] ) { boolean[] avail = NFCUtils.nfcAvail( m_activity );
msg += "\n\n" + getString( R.string.invite_if_nfc ); if ( avail[1] ) {
msg += "\n\n" + getString( R.string.invite_if_nfc );
}
} }
showConfirmThen( msg, R.string.newgame_invite, faction ); showConfirmThen( msg, R.string.newgame_invite, faction );