mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-16 15:41:16 +01:00
get and save new summary in resetGame so connected games don't show in
gameslist as unconnected after being reset or copied.
This commit is contained in:
parent
87f5aada74
commit
cfbdfac10b
2 changed files with 6 additions and 3 deletions
|
@ -162,11 +162,9 @@ public class GamesList extends ListActivity implements View.OnClickListener {
|
||||||
|
|
||||||
case R.id.list_item_reset:
|
case R.id.list_item_reset:
|
||||||
Utils.resetGame( this, path, path );
|
Utils.resetGame( this, path, path );
|
||||||
Utils.saveSummary( path, null );
|
|
||||||
break;
|
break;
|
||||||
case R.id.list_item_new_from:
|
case R.id.list_item_new_from:
|
||||||
String newName = Utils.resetGame( this, path );
|
String newName = Utils.resetGame( this, path );
|
||||||
Utils.saveSummary( newName, null );
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R.id.list_item_copy:
|
case R.id.list_item_copy:
|
||||||
|
|
|
@ -158,8 +158,13 @@ public class Utils {
|
||||||
XwJNI.comms_setAddr( gamePtr, addr );
|
XwJNI.comms_setAddr( gamePtr, addr );
|
||||||
}
|
}
|
||||||
saveGame( context, gamePtr, gi, pathOut );
|
saveGame( context, gamePtr, gi, pathOut );
|
||||||
|
|
||||||
|
GameSummary summary = new GameSummary();
|
||||||
|
XwJNI.game_summarize( gamePtr, gi.nPlayers, summary );
|
||||||
|
saveSummary( pathOut, summary );
|
||||||
|
|
||||||
XwJNI.game_dispose( gamePtr );
|
XwJNI.game_dispose( gamePtr );
|
||||||
}
|
} // resetGame
|
||||||
|
|
||||||
public static String[] gamesList( Context context )
|
public static String[] gamesList( Context context )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue