mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
from GamesList.onNewIntent, launch the first changed game rather than
just invalidating all changed list items.
This commit is contained in:
parent
ed8707fb4b
commit
20ad465b96
1 changed files with 15 additions and 9 deletions
|
@ -243,6 +243,7 @@ public class GamesList extends XWListActivity
|
|||
m_handler.post( new Runnable() {
|
||||
public void run() {
|
||||
invalRelayIDs( relayIDs );
|
||||
startFirstHasDict( relayIDs );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
@ -514,20 +515,25 @@ public class GamesList extends XWListActivity
|
|||
|
||||
// Launch the first of these for which there's a dictionary
|
||||
// present.
|
||||
private void startFirstHasDict( String[] relayIDs )
|
||||
{
|
||||
if ( null != relayIDs ) {
|
||||
for ( String relayID : relayIDs ) {
|
||||
String path = DBUtils.getPathFor( this, relayID );
|
||||
if ( GameUtils.gameDictHere( this, path ) ) {
|
||||
GameUtils.launchGame( this, path );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void startFirstHasDict( Intent intent )
|
||||
{
|
||||
if ( null != intent ) {
|
||||
String[] relayIDs = intent
|
||||
.getStringArrayExtra( getString( R.string.relayids_extra ) );
|
||||
if ( null != relayIDs ) {
|
||||
for ( String relayID : relayIDs ) {
|
||||
String path = DBUtils.getPathFor( this, relayID );
|
||||
if ( GameUtils.gameDictHere( this, path ) ) {
|
||||
GameUtils.launchGame( this, path );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
startFirstHasDict( relayIDs );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue