don't show all-here not-again dialog to host host -- already got the

first-in version.
This commit is contained in:
Andy2 2010-10-29 19:14:56 -07:00
parent 148fe848c2
commit 3d52698939

View file

@ -626,8 +626,8 @@ public class BoardActivity extends XWActivity implements UtilCtxt {
CommsTransport.ConndMsg cndmsg =
(CommsTransport.ConndMsg)msg.obj;
int naMsg;
int naKey;
int naMsg = 0;
int naKey = 0;
String str = null;
if ( cndmsg.m_allHere ) {
// All players have now joined the game. The device that
@ -635,8 +635,10 @@ public class BoardActivity extends XWActivity implements UtilCtxt {
// the first player's turn
String fmt = getString( R.string.msg_relay_all_heref );
str = String.format( fmt, cndmsg.m_room );
naMsg = R.string.not_again_conndall;
naKey = R.string.key_notagain_conndall;
if ( cndmsg.m_devOrder > 1 ) {
naMsg = R.string.not_again_conndall;
naKey = R.string.key_notagain_conndall;
}
} else if ( cndmsg.m_nMissing > 0 ) {
String fmt = getString( R.string.msg_relay_waiting );
str = String.format( fmt, cndmsg.m_devOrder,
@ -648,8 +650,6 @@ public class BoardActivity extends XWActivity implements UtilCtxt {
naMsg = R.string.not_again_conndmid;
naKey = R.string.key_notagain_conndmid;
}
} else {
naMsg = naKey = 0; // keep compiler happy
}
if ( null != str ) {
@ -660,7 +660,11 @@ public class BoardActivity extends XWActivity implements UtilCtxt {
Toast.LENGTH_SHORT).show();
}
};
showNotAgainDlgThen( naMsg, naKey, proc );
if ( naMsg == 0 ) {
proc.run();
} else {
showNotAgainDlgThen( naMsg, naKey, proc );
}
}
} // handleConndMessage