mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
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:
parent
9df2d0c1dc
commit
e7e04fc2bb
1 changed files with 17 additions and 4 deletions
|
@ -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 );
|
||||||
|
|
Loading…
Reference in a new issue