mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
prevent lookup dialogs from coming up before button pressed by not
assigning m_words too early.
This commit is contained in:
parent
9152609bdd
commit
5773466fb6
1 changed files with 5 additions and 4 deletions
|
@ -256,19 +256,19 @@ public class BoardActivity extends XWActivity
|
|||
};
|
||||
ab.setNegativeButton( R.string.button_no, lstnr );
|
||||
} else if ( DLG_SCORES_BLK == id ) {
|
||||
m_words = m_wordsWaiting;
|
||||
if ( null != m_words && m_words.length > 0 ) {
|
||||
if ( null != m_wordsWaiting && m_wordsWaiting.length > 0 ) {
|
||||
String buttonTxt;
|
||||
if ( m_words.length == 1 ) {
|
||||
if ( m_wordsWaiting.length == 1 ) {
|
||||
buttonTxt = Utils.format( this,
|
||||
R.string.button_lookupf,
|
||||
m_words[0] );
|
||||
m_wordsWaiting[0] );
|
||||
} else {
|
||||
buttonTxt = getString( R.string.button_lookup );
|
||||
}
|
||||
lstnr = new DialogInterface.OnClickListener() {
|
||||
public void onClick( DialogInterface dialog,
|
||||
int whichButton ) {
|
||||
m_words = m_wordsWaiting;
|
||||
lookupWord();
|
||||
}
|
||||
};
|
||||
|
@ -1228,6 +1228,7 @@ public class BoardActivity extends XWActivity
|
|||
m_dlgBytes = expl;
|
||||
m_dlgTitle = R.string.info_title;
|
||||
m_wordsWaiting = wordsToMWords( words );
|
||||
Assert.assertNull( m_words );
|
||||
Assert.assertTrue( wordCount == m_wordsWaiting.length );
|
||||
waitBlockingDialog( DLG_SCORES_BLK, 0 );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue