mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
getRelayIDs -> getRelayIDNoMsgs to allow option of querying all, even
those already flagged as having new data. The idea is that there might be still newer data available, e.g. chat messages, that should be fetched.
This commit is contained in:
parent
cf65d9baec
commit
b4d0774aa7
1 changed files with 5 additions and 3 deletions
|
@ -260,7 +260,7 @@ public class DBUtils {
|
|||
return result;
|
||||
}
|
||||
|
||||
public static String[] getRelayIDNoMsgs( Context context )
|
||||
public static String[] getRelayIDs( Context context, boolean noMsgs )
|
||||
{
|
||||
String[] result = null;
|
||||
initDB( context );
|
||||
|
@ -269,8 +269,10 @@ public class DBUtils {
|
|||
synchronized( s_dbHelper ) {
|
||||
SQLiteDatabase db = s_dbHelper.getReadableDatabase();
|
||||
String[] columns = { DBHelper.RELAYID };
|
||||
String selection = DBHelper.RELAYID + " NOT null AND "
|
||||
+ "NOT " + DBHelper.HASMSGS;
|
||||
String selection = DBHelper.RELAYID + " NOT null";
|
||||
if ( noMsgs ) {
|
||||
selection += " AND NOT " + DBHelper.HASMSGS;
|
||||
}
|
||||
|
||||
Cursor cursor = db.query( DBHelper.TABLE_NAME_SUM, columns,
|
||||
selection, null, null, null, null );
|
||||
|
|
Loading…
Reference in a new issue