mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-20 22:26:54 +01:00
fix showNotAgainDlgThen(): when the pref is set to skip the hint, we
still can't call the callback directly because then showNotAgainDlgThen() is synchronous only in that case. For consistency, post the callback call to a handler.
This commit is contained in:
parent
266cd6fe85
commit
33252c929c
1 changed files with 12 additions and 5 deletions
|
@ -157,15 +157,21 @@ public class DlgDelegate {
|
|||
}
|
||||
|
||||
public void showNotAgainDlgThen( int msgID, int prefsKey,
|
||||
int callbackID, Object[] params )
|
||||
final int callbackID,
|
||||
final Object[] params )
|
||||
{
|
||||
if ( XWPrefs.getPrefsBoolean( m_activity, prefsKey, false ) ) {
|
||||
// If it's set, do the action without bothering with the
|
||||
// dialog
|
||||
if ( SKIP_CALLBACK != callbackID ) {
|
||||
m_clickCallback.dlgButtonClicked( callbackID,
|
||||
AlertDialog.BUTTON_POSITIVE,
|
||||
params );
|
||||
post( new Runnable() {
|
||||
public void run() {
|
||||
m_clickCallback
|
||||
.dlgButtonClicked( callbackID,
|
||||
AlertDialog.BUTTON_POSITIVE,
|
||||
params );
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
String msg = m_activity.getString( msgID );
|
||||
|
@ -221,7 +227,8 @@ public class DlgDelegate {
|
|||
} else {
|
||||
post( new Runnable() {
|
||||
public void run() {
|
||||
m_clickCallback.dlgButtonClicked( callbackID, EMAIL_BTN, null );
|
||||
m_clickCallback.dlgButtonClicked( callbackID, EMAIL_BTN,
|
||||
null );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue