mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-09 22:00:39 +01:00
change invite alert track/dismiss logic
Attempt to fix invite alert sticking around after game connection finishes, which resulted from the variable pointing to the alert having been set to null. So stop setting it in onDismiss listener. I think trying to track it via an iVar is a mistake, that dismiss by tag or somesuch is the right way to go. But my dialog fragment code isn't up to that yet.
This commit is contained in:
parent
c6a72b63ee
commit
ca93f808f3
1 changed files with 3 additions and 8 deletions
|
@ -537,12 +537,6 @@ public class BoardDelegate extends DelegateBase
|
|||
finish();
|
||||
}
|
||||
} );
|
||||
alert.setOnDismissListener( new DBAlert.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismissed( XWDialogFragment frag ) {
|
||||
m_inviteAlert = null;
|
||||
}
|
||||
} );
|
||||
}
|
||||
return dialog;
|
||||
} // makeInviteDialog
|
||||
|
@ -2207,7 +2201,8 @@ public class BoardDelegate extends DelegateBase
|
|||
if ( m_relayMissing && connected ) {
|
||||
m_relayMissing = false;
|
||||
}
|
||||
if ( 0 == nMissing || !m_relayMissing ) {
|
||||
// Why this m_relayMissing thing?
|
||||
if ( 0 == nMissing /* || !m_relayMissing*/ ) {
|
||||
Log.d( TAG, "dismissing invite alert %H", m_inviteAlert );
|
||||
dismissInviteAlert();
|
||||
}
|
||||
|
@ -2310,7 +2305,7 @@ public class BoardDelegate extends DelegateBase
|
|||
|
||||
private void showInviteAlertIf()
|
||||
{
|
||||
if ( null == m_inviteAlert && m_mySIS.nMissing > 0 && !isFinishing() ) {
|
||||
if ( /* null == m_inviteAlert && */m_mySIS.nMissing > 0 && !isFinishing() ) {
|
||||
InviteAlertState ias = new InviteAlertState();
|
||||
ias.summary = m_summary;
|
||||
ias.gi = m_gi;
|
||||
|
|
Loading…
Add table
Reference in a new issue