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 )
|
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 )
|
private void alertOrderIncrIfAt( StartAlertOrder ord )
|
||||||
{
|
{
|
||||||
|
Log.d( TAG, "alertOrderIncrIfAt(%s)", ord );
|
||||||
if ( alertOrderAt( ord ) ) {
|
if ( alertOrderAt( ord ) ) {
|
||||||
m_mySIS.mAlertOrder = ord.values()[ord.ordinal() + 1];
|
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
|
@Override
|
||||||
public boolean onPosButton( Action action, final Object[] params )
|
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;
|
boolean handled = true;
|
||||||
JNICmd cmd = null;
|
JNICmd cmd = null;
|
||||||
switch ( action ) {
|
switch ( action ) {
|
||||||
|
@ -1169,6 +1188,7 @@ public class BoardDelegate extends DelegateBase
|
||||||
@Override
|
@Override
|
||||||
public boolean onNegButton( Action action, Object[] params )
|
public boolean onNegButton( Action action, Object[] params )
|
||||||
{
|
{
|
||||||
|
Log.d( TAG, "onNegButton(%s, %s)", action, DbgUtils.toStr( params ) );
|
||||||
boolean handled = true;
|
boolean handled = true;
|
||||||
switch ( action ) {
|
switch ( action ) {
|
||||||
case ENABLE_RELAY_DO_OR:
|
case ENABLE_RELAY_DO_OR:
|
||||||
|
@ -1206,6 +1226,7 @@ public class BoardDelegate extends DelegateBase
|
||||||
@Override
|
@Override
|
||||||
public boolean onDismissed( Action action, Object[] params )
|
public boolean onDismissed( Action action, Object[] params )
|
||||||
{
|
{
|
||||||
|
Log.d( TAG, "onDismissed(%s, %s)", action, DbgUtils.toStr( params ) );
|
||||||
boolean handled = true;
|
boolean handled = true;
|
||||||
switch ( action ) {
|
switch ( action ) {
|
||||||
case ENABLE_RELAY_DO_OR:
|
case ENABLE_RELAY_DO_OR:
|
||||||
|
@ -1232,6 +1253,10 @@ public class BoardDelegate extends DelegateBase
|
||||||
finish();
|
finish();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DROP_SMS_ACTION:
|
||||||
|
alertOrderIncrIfAt( StartAlertOrder.NBS_PERMS );
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
handled = false;
|
handled = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -387,8 +387,9 @@ public class DlgDelegate {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showConfirmThen( int nakey, Action onNA, String msg,
|
private void showConfirmThen( int nakey, Action onNA, String msg,
|
||||||
int posButton, int negButton, Action action,
|
int posButton, int negButton,
|
||||||
int titleId, ActionPair more, Object[] params )
|
final Action action, int titleId,
|
||||||
|
ActionPair more, final Object[] params )
|
||||||
{
|
{
|
||||||
if ( 0 == nakey ||
|
if ( 0 == nakey ||
|
||||||
! XWPrefs.getPrefsBoolean( m_activity, nakey, false ) ) {
|
! XWPrefs.getPrefsBoolean( m_activity, nakey, false ) ) {
|
||||||
|
@ -404,6 +405,13 @@ public class DlgDelegate {
|
||||||
.setPrefsKey( nakey )
|
.setPrefsKey( nakey )
|
||||||
;
|
;
|
||||||
m_dlgt.show( state );
|
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