mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-04 20:46:28 +01:00
fix invite not coming up after perms warning dismissed
or when it's not shown at all because the not-again checkbox is checked
This commit is contained in:
parent
d914706ef8
commit
f890d74e63
2 changed files with 37 additions and 4 deletions
|
@ -169,13 +169,32 @@ public class BoardDelegate extends DelegateBase
|
|||
|
||||
private boolean alertOrderAt( StartAlertOrder ord )
|
||||
{
|
||||
return m_mySIS.mAlertOrder == ord;
|
||||
boolean result = m_mySIS.mAlertOrder == ord;
|
||||
Log.d( TAG, "alertOrderAt(%s) => %b", ord, result );
|
||||
return result;
|
||||
}
|
||||
|
||||
private void alertOrderIncrIfAt( StartAlertOrder ord )
|
||||
{
|
||||
Log.d( TAG, "alertOrderIncrIfAt(%s)", ord );
|
||||
if ( alertOrderAt( ord ) ) {
|
||||
m_mySIS.mAlertOrder = ord.values()[ord.ordinal() + 1];
|
||||
doNext();
|
||||
}
|
||||
}
|
||||
|
||||
private void doNext()
|
||||
{
|
||||
switch ( m_mySIS.mAlertOrder ) {
|
||||
case NBS_PERMS:
|
||||
askNBSPermissions();
|
||||
break;
|
||||
case NO_MEANS:
|
||||
warnIfNoTransport();
|
||||
break;
|
||||
case INVITE:
|
||||
showInviteAlertIf();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1016,7 +1035,7 @@ public class BoardDelegate extends DelegateBase
|
|||
@Override
|
||||
public boolean onPosButton( Action action, final Object[] params )
|
||||
{
|
||||
// Log.d( TAG, "onPosButton(%s, %s)", action, DbgUtils.toStr( params ) );
|
||||
Log.d( TAG, "onPosButton(%s, %s)", action, DbgUtils.toStr( params ) );
|
||||
boolean handled = true;
|
||||
JNICmd cmd = null;
|
||||
switch ( action ) {
|
||||
|
@ -1169,6 +1188,7 @@ public class BoardDelegate extends DelegateBase
|
|||
@Override
|
||||
public boolean onNegButton( Action action, Object[] params )
|
||||
{
|
||||
Log.d( TAG, "onNegButton(%s, %s)", action, DbgUtils.toStr( params ) );
|
||||
boolean handled = true;
|
||||
switch ( action ) {
|
||||
case ENABLE_RELAY_DO_OR:
|
||||
|
@ -1206,6 +1226,7 @@ public class BoardDelegate extends DelegateBase
|
|||
@Override
|
||||
public boolean onDismissed( Action action, Object[] params )
|
||||
{
|
||||
Log.d( TAG, "onDismissed(%s, %s)", action, DbgUtils.toStr( params ) );
|
||||
boolean handled = true;
|
||||
switch ( action ) {
|
||||
case ENABLE_RELAY_DO_OR:
|
||||
|
@ -1232,6 +1253,10 @@ public class BoardDelegate extends DelegateBase
|
|||
finish();
|
||||
break;
|
||||
|
||||
case DROP_SMS_ACTION:
|
||||
alertOrderIncrIfAt( StartAlertOrder.NBS_PERMS );
|
||||
break;
|
||||
|
||||
default:
|
||||
handled = false;
|
||||
}
|
||||
|
|
|
@ -387,8 +387,9 @@ public class DlgDelegate {
|
|||
}
|
||||
|
||||
private void showConfirmThen( int nakey, Action onNA, String msg,
|
||||
int posButton, int negButton, Action action,
|
||||
int titleId, ActionPair more, Object[] params )
|
||||
int posButton, int negButton,
|
||||
final Action action, int titleId,
|
||||
ActionPair more, final Object[] params )
|
||||
{
|
||||
if ( 0 == nakey ||
|
||||
! XWPrefs.getPrefsBoolean( m_activity, nakey, false ) ) {
|
||||
|
@ -404,6 +405,13 @@ public class DlgDelegate {
|
|||
.setPrefsKey( nakey )
|
||||
;
|
||||
m_dlgt.show( state );
|
||||
} else if ( Action.SKIP_CALLBACK != action ) {
|
||||
post( new Runnable() {
|
||||
public void run() {
|
||||
XWActivity xwact = (XWActivity)m_activity;
|
||||
xwact.onDismissed( action, params );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue