mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
fix #24, replace empty names with numbers at Recents too
This commit is contained in:
@ -44,7 +44,11 @@ class RecentsHelper(private val context: Context) {
|
||||
context.queryCursor(uri, projection, sortOrder = sortOrder, showErrors = true) { cursor ->
|
||||
val id = cursor.getIntValue(Calls._ID)
|
||||
val number = cursor.getStringValue(Calls.NUMBER)
|
||||
val name = cursor.getStringValue(Calls.CACHED_NAME) ?: number
|
||||
var name = cursor.getStringValue(Calls.CACHED_NAME)
|
||||
if (name == null || name.isEmpty()) {
|
||||
name = number
|
||||
}
|
||||
|
||||
val photoUri = cursor.getStringValue(Calls.CACHED_PHOTO_URI) ?: ""
|
||||
val startTS = (cursor.getLongValue(Calls.DATE) / 1000L).toInt()
|
||||
val duration = cursor.getIntValue(Calls.DURATION)
|
||||
|
Reference in New Issue
Block a user