Fix no results sometimes not correctly displayed

This commit is contained in:
Sylvia van Os
2021-10-05 20:15:10 +02:00
parent 61a3054655
commit 7b0652ff11
3 changed files with 12 additions and 7 deletions

View File

@@ -685,9 +685,13 @@ public class DBHelper extends SQLiteOpenHelper
*/
public int getLoyaltyCardCount(String filter)
{
if (filter.isEmpty()) {
return getLoyaltyCardCount();
}
SQLiteDatabase db = getReadableDatabase();
return (int) DatabaseUtils.queryNumEntries(db, LoyaltyCardDbFTS.TABLE,
LoyaltyCardDbIds.TABLE + " MATCH ? ", withArgs(filter + '*'));
LoyaltyCardDbFTS.TABLE + " MATCH ? ", withArgs(filter + '*'));
}
/**