mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
fix rematch info getting overwritten the first time a game is
opened. Some GameSummary fields are unknown to jni code and so shouldn't be saved if they happen to be empty (as they will be when the GameSummary is created by jni and never merged with what was read from the DB when the game was loaded.
This commit is contained in:
parent
7325377bcb
commit
dcedbefd63
1 changed files with 9 additions and 1 deletions
|
@ -291,7 +291,15 @@ public class DBUtils {
|
|||
values.put( DBHelper.GAMEID, summary.gameID );
|
||||
values.put( DBHelper.GAME_OVER, summary.gameOver? 1 : 0 );
|
||||
values.put( DBHelper.LASTMOVE, summary.lastMoveTime );
|
||||
values.put( DBHelper.EXTRAS, summary.getExtras() );
|
||||
|
||||
// Don't overwrite extras! Sometimes this method is called from
|
||||
// JNIThread which has created the summary from common code that
|
||||
// doesn't know about Android additions. Leave those unset to
|
||||
// avoid overwriting.
|
||||
String extras = summary.getExtras();
|
||||
if ( null != extras ) {
|
||||
values.put( DBHelper.EXTRAS, summary.getExtras() );
|
||||
}
|
||||
long nextNag = summary.nextTurnIsLocal() ?
|
||||
NagTurnReceiver.figureNextNag( context,
|
||||
1000*(long)summary.lastMoveTime )
|
||||
|
|
Loading…
Reference in a new issue