sort games by whose turn it is, local at top

This commit is contained in:
Eric House 2016-09-01 07:14:41 -07:00
parent b64bf82278
commit 4b25d17dbf

View file

@ -1630,7 +1630,8 @@ public class DBUtils {
initDB( context );
String[] columns = { ROW_ID };
String selection = String.format( "%s=%d", DBHelper.GROUPID, groupID );
String orderBy = DBHelper.CREATE_TIME + " DESC";
String orderBy = String.format( "%s,%s DESC,%s", DBHelper.GAME_OVER,
DBHelper.TURN_LOCAL, DBHelper.LASTMOVE );
synchronized( s_dbHelper ) {
SQLiteDatabase db = s_dbHelper.getReadableDatabase();
Cursor cursor = db.query( DBHelper.TABLE_NAME_SUM, columns,