check for dict before making game from invite

This belongs in common code but that's for later.
This commit is contained in:
Eric House 2022-09-26 07:18:46 -07:00
parent 75eaadaddb
commit 758a157472
2 changed files with 9 additions and 2 deletions

View file

@ -600,7 +600,7 @@ public class GameUtils {
if ( null != gamePtr ) {
long rowid = saveNewGame1( context, gamePtr, -1, "name" );
} else {
Assert.failDbg();
Log.d( TAG, "handleInvitation(): unable to create" );
}
}
}

View file

@ -134,7 +134,14 @@ abstract class XWServiceHelper {
String device, DictFetchOwner dfo )
{
// PENDING: get the test for dicts back in
GameUtils.handleInvitation( mContext, nli, getSink(0) );
if ( DictLangCache.haveDict( mContext, nli.isoCode(), nli.dict ) ) {
GameUtils.handleInvitation( mContext, nli, getSink(0) );
} else {
Intent intent = MultiService
.makeMissingDictIntent( mContext, nli, dfo );
MultiService.postMissingDictNotification( mContext, intent,
nli.gameID() );
}
return true;
// boolean success = false;