mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-05 20:45:49 +01:00
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:
parent
e1fec99860
commit
d40b8b7cad
1 changed files with 9 additions and 8 deletions
|
@ -1257,12 +1257,14 @@ public class BoardDelegate extends DelegateBase
|
||||||
@SuppressWarnings("fallthrough")
|
@SuppressWarnings("fallthrough")
|
||||||
public void eventOccurred( MultiService.MultiEvent event, final Object ... args )
|
public void eventOccurred( MultiService.MultiEvent event, final Object ... args )
|
||||||
{
|
{
|
||||||
|
boolean doStopProgress = false;
|
||||||
switch( event ) {
|
switch( event ) {
|
||||||
case MESSAGE_ACCEPTED:
|
case MESSAGE_ACCEPTED:
|
||||||
case MESSAGE_REFUSED:
|
case MESSAGE_REFUSED:
|
||||||
ConnStatusHandler.
|
ConnStatusHandler.
|
||||||
updateStatusIn( m_activity, this, CommsConnType.COMMS_CONN_BT,
|
updateStatusIn( m_activity, this, CommsConnType.COMMS_CONN_BT,
|
||||||
MultiService.MultiEvent.MESSAGE_ACCEPTED == event);
|
MultiService.MultiEvent.MESSAGE_ACCEPTED == event);
|
||||||
|
doStopProgress = true;
|
||||||
break;
|
break;
|
||||||
case MESSAGE_NOGAME:
|
case MESSAGE_NOGAME:
|
||||||
int gameID = (Integer)args[0];
|
int gameID = (Integer)args[0];
|
||||||
|
@ -1285,10 +1287,7 @@ public class BoardDelegate extends DelegateBase
|
||||||
Log.w( TAG, "failed to create game" );
|
Log.w( TAG, "failed to create game" );
|
||||||
break;
|
break;
|
||||||
case NEWGAME_DUP_REJECTED:
|
case NEWGAME_DUP_REJECTED:
|
||||||
if ( m_progressShown ) {
|
doStopProgress = true;
|
||||||
m_progressShown = false;
|
|
||||||
stopProgress(); // in case it's a BT invite
|
|
||||||
}
|
|
||||||
final String msg =
|
final String msg =
|
||||||
getString( R.string.err_dup_invite_fmt, (String)args[0] );
|
getString( R.string.err_dup_invite_fmt, (String)args[0] );
|
||||||
post( new Runnable() {
|
post( new Runnable() {
|
||||||
|
@ -1311,13 +1310,15 @@ public class BoardDelegate extends DelegateBase
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if ( m_progressShown ) {
|
doStopProgress = true; // in case it's a BT invite
|
||||||
m_progressShown = false;
|
|
||||||
stopProgress(); // in case it's a BT invite
|
|
||||||
}
|
|
||||||
super.eventOccurred( event, args );
|
super.eventOccurred( event, args );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( doStopProgress && m_progressShown ) {
|
||||||
|
m_progressShown = false;
|
||||||
|
stopProgress();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Reference in a new issue