mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Add some padding for easier readability
This commit is contained in:
parent
a216f82b35
commit
997cd68344
1 changed files with 3 additions and 2 deletions
|
@ -42,10 +42,11 @@ internal class RealmDebugTools(
|
|||
separator()
|
||||
append("\n$baseName Realm is empty: ${realm.isEmpty}")
|
||||
var total = 0L
|
||||
val maxNameLength = realmConfiguration.realmObjectClasses.maxOf { it.simpleName.length }
|
||||
realmConfiguration.realmObjectClasses.forEach { modelClazz ->
|
||||
val count = realm.where(modelClazz).count()
|
||||
total += count
|
||||
append("\n$baseName Realm - count ${modelClazz.simpleName}: $count")
|
||||
append("\n$baseName Realm - count ${modelClazz.simpleName.padEnd(maxNameLength)} : $count")
|
||||
}
|
||||
separator()
|
||||
append("\n$baseName Realm - total count: $total")
|
||||
|
@ -56,5 +57,5 @@ internal class RealmDebugTools(
|
|||
.let { Timber.i(it) }
|
||||
}
|
||||
|
||||
internal fun StringBuilder.separator() = append("\n==============================================")
|
||||
private fun StringBuilder.separator() = append("\n==============================================")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue