mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-22 07:28:16 +01:00
redo invite/wait alert after invitation sent
Needs to show different text and buttons, so now that it isn't getting dismissed and rebuilt every time a button's pressed force that process manually the time it's required.
This commit is contained in:
parent
a5d0d02faf
commit
059bf82392
1 changed files with 16 additions and 0 deletions
|
@ -128,6 +128,7 @@ public class BoardDelegate extends DelegateBase
|
|||
|
||||
private int m_nGuestDevs = -1;
|
||||
private boolean m_haveInvited = false;
|
||||
private boolean m_showedReInvite;
|
||||
private boolean m_overNotShown;
|
||||
private boolean m_dropOnDismiss;
|
||||
private DBAlert m_inviteAlert;
|
||||
|
@ -445,6 +446,7 @@ public class BoardDelegate extends DelegateBase
|
|||
int nSent = sentInfo[0].getMinPlayerCount();
|
||||
boolean invitesSent = nSent >= state.nMissing;
|
||||
if ( invitesSent ) {
|
||||
m_showedReInvite = true;
|
||||
if ( state.summary.hasRematchInfo() ) {
|
||||
titleID = R.string.waiting_rematch_title;
|
||||
message = LocUtils.getString( activity, R.string.rematch_msg );
|
||||
|
@ -2775,7 +2777,21 @@ public class BoardDelegate extends DelegateBase
|
|||
|
||||
private void recordInviteSent( InviteMeans means, String dev )
|
||||
{
|
||||
boolean invitesSent = true;
|
||||
if ( !m_showedReInvite ) { // have we sent since?
|
||||
SentInvitesInfo sentInfo = DBUtils.getInvitesFor( m_activity, m_rowid );
|
||||
int nSent = sentInfo.getMinPlayerCount();
|
||||
invitesSent = nSent >= m_mySIS.nMissing;
|
||||
}
|
||||
|
||||
DBUtils.recordInviteSent( m_activity, m_rowid, means, dev );
|
||||
|
||||
if ( !invitesSent ) {
|
||||
m_inviteAlert.dismiss();
|
||||
m_inviteAlert = null;
|
||||
DbgUtils.logd( TAG, "recordInviteSent(): redoing invite alert" );
|
||||
showInviteAlertIf();
|
||||
}
|
||||
}
|
||||
|
||||
private void handleViaThread( JNICmd cmd, Object... args )
|
||||
|
|
Loading…
Reference in a new issue