mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
don't dismiss alert when about to post it again
On 4.2 and 4.3 at least, the dimiss comes after the second post causing that to be dismissed, leaving no alert and the app in some weird state where not even the back button works. It's been this way on those older versions since I redid invitations for beta 98.
This commit is contained in:
parent
b5afc25ead
commit
5f8e5dc343
1 changed files with 13 additions and 4 deletions
|
@ -1570,7 +1570,7 @@ public class BoardDelegate extends DelegateBase
|
|||
private void handleConndMessage( String room, int devOrder, // <- hostID
|
||||
boolean allHere, int nMissing )
|
||||
{
|
||||
dismissInviteAlert( nMissing, true );
|
||||
boolean skipDismiss = false;
|
||||
|
||||
int naMsg = 0;
|
||||
int naKey = 0;
|
||||
|
@ -1598,6 +1598,7 @@ public class BoardDelegate extends DelegateBase
|
|||
m_room = room;
|
||||
showDialog( DlgID.DLG_INVITE );
|
||||
invalidateOptionsMenuIf();
|
||||
skipDismiss = true;
|
||||
} else {
|
||||
toastStr = getQuantityString( R.plurals.msg_relay_waiting_fmt, nMissing,
|
||||
devOrder, room, nMissing );
|
||||
|
@ -1622,6 +1623,10 @@ public class BoardDelegate extends DelegateBase
|
|||
}
|
||||
}
|
||||
|
||||
if ( !skipDismiss ) {
|
||||
dismissInviteAlert( nMissing, true ); // NO!!!
|
||||
}
|
||||
|
||||
invalidateOptionsMenuIf();
|
||||
} // handleConndMessage
|
||||
|
||||
|
@ -1926,26 +1931,30 @@ public class BoardDelegate extends DelegateBase
|
|||
public void informMissing( boolean isServer, CommsConnTypeSet connTypes,
|
||||
int nDevs, final int nMissing )
|
||||
{
|
||||
boolean doDismiss = true;
|
||||
m_connTypes = connTypes;
|
||||
Assert.assertTrue( isServer || 0 == nMissing );
|
||||
// DbgUtils.logf( "BoardDelegate.informMissing(isServer=%b, nDevs=%d, nMissing=%d)",
|
||||
// isServer, nDevs, nMissing );
|
||||
m_nGuestDevs = nDevs;
|
||||
|
||||
// If we might have put up an alert earlier, take it down
|
||||
dismissInviteAlert( nMissing, !m_relayMissing );
|
||||
|
||||
m_nMissing = nMissing; // will be 0 unless isServer is true
|
||||
|
||||
if ( null != connTypes && 0 == connTypes.size() ) {
|
||||
askNoAddrsDelete();
|
||||
} else if ( 0 < nMissing && isServer && !m_haveInvited ) {
|
||||
doDismiss = false;
|
||||
post( new Runnable() {
|
||||
public void run() {
|
||||
showDialog( DlgID.DLG_INVITE );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
// If we might have put up an alert earlier, take it down
|
||||
if ( doDismiss ) {
|
||||
dismissInviteAlert( nMissing, !m_relayMissing );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue