Show actual app name in app selection for restore

This commit is contained in:
Torsten Grote 2024-05-22 14:20:01 -03:00
parent 1667d44967
commit a0a3e871e0
No known key found for this signature in database
GPG key ID: 3E5F77D92CF891FF

View file

@ -25,7 +25,7 @@ internal data class SelectableAppItem(
val selected: Boolean, val selected: Boolean,
val hasIcon: Boolean? = null, val hasIcon: Boolean? = null,
) { ) {
val name: String get() = packageName val name: String get() = metadata.name?.toString() ?: packageName
} }
internal class AppSelectionAdapter( internal class AppSelectionAdapter(
@ -107,8 +107,7 @@ internal class AppSelectionAdapter(
} else { } else {
appIcon.alpha = 1f appIcon.alpha = 1f
} }
appIcon.setImageResource(R.drawable.ic_launcher_default) appName.text = item.name
appName.text = item.packageName
val time = if (item.metadata.time > 0) DateUtils.getRelativeTimeSpanString( val time = if (item.metadata.time > 0) DateUtils.getRelativeTimeSpanString(
item.metadata.time, item.metadata.time,
System.currentTimeMillis(), System.currentTimeMillis(),