Skip to content

Commit

Permalink
Fix empty name crash when fetching first alpha recipient row.
Browse files Browse the repository at this point in the history
  • Loading branch information
clark-signal committed Mar 29, 2023
1 parent 0017b7a commit cb4a45f
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -233,7 +233,7 @@ class ContactSearchPagedDataSource(
cursor.moveToPosition(-1)
while (cursor.moveToNext()) {
val sortName = cursor.getString(cursor.getColumnIndexOrThrow(ContactRepository.NAME_COLUMN))
if (!sortName.first().isDigit()) {
if (sortName.isNotEmpty() && !sortName.first().isDigit()) {
return cursor.position
}
}
Expand Down

0 comments on commit cb4a45f

Please sign in to comment.