Fix calls count when there are no entries to display.

This commit is contained in:
Alex Hart
2024-09-16 09:42:13 -03:00
parent 6188502cb1
commit 0a346eda5b

View File

@@ -1408,8 +1408,11 @@ class CallTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTabl
fun getCallsCount(searchTerm: String?, filter: CallLogFilter): Int {
return getCallsCursor(true, 0, 0, searchTerm, filter).use {
it.moveToFirst()
it.getInt(0)
if (it.moveToFirst()) {
it.getInt(0)
} else {
0
}
}
}