dismiss the BT invite progress thing on success

Not sure how this broke in the reorg of XWService stuff, but let's be
agressive about dismissing that thing.
This commit is contained in:
Eric House 2018-07-19 06:29:59 -07:00
parent e1fec99860
commit d40b8b7cad

View file

@ -1257,12 +1257,14 @@ public class BoardDelegate extends DelegateBase
@SuppressWarnings("fallthrough")
public void eventOccurred( MultiService.MultiEvent event, final Object ... args )
{
boolean doStopProgress = false;
switch( event ) {
case MESSAGE_ACCEPTED:
case MESSAGE_REFUSED:
ConnStatusHandler.
updateStatusIn( m_activity, this, CommsConnType.COMMS_CONN_BT,
MultiService.MultiEvent.MESSAGE_ACCEPTED == event);
doStopProgress = true;
break;
case MESSAGE_NOGAME:
int gameID = (Integer)args[0];
@ -1285,10 +1287,7 @@ public class BoardDelegate extends DelegateBase
Log.w( TAG, "failed to create game" );
break;
case NEWGAME_DUP_REJECTED:
if ( m_progressShown ) {
m_progressShown = false;
stopProgress(); // in case it's a BT invite
}
doStopProgress = true;
final String msg =
getString( R.string.err_dup_invite_fmt, (String)args[0] );
post( new Runnable() {
@ -1311,13 +1310,15 @@ public class BoardDelegate extends DelegateBase
break;
default:
if ( m_progressShown ) {
m_progressShown = false;
stopProgress(); // in case it's a BT invite
}
doStopProgress = true; // in case it's a BT invite
super.eventOccurred( event, args );
break;
}
if ( doStopProgress && m_progressShown ) {
m_progressShown = false;
stopProgress();
}
}
//////////////////////////////////////////////////