overriding toString() of FileDirItem, as it is no longer a data class
This commit is contained in:
parent
f8d2739a1d
commit
c714b79f48
1 changed files with 2 additions and 0 deletions
|
@ -11,6 +11,8 @@ open class FileDirItem(val path: String, val name: String = "", var isDirectory:
|
||||||
var sorting = 0
|
var sorting = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun toString() = "FileDirItem(path=$path, name=$name, isDirectory=$isDirectory, children=$children, size=$size)"
|
||||||
|
|
||||||
override fun compareTo(other: FileDirItem): Int {
|
override fun compareTo(other: FileDirItem): Int {
|
||||||
return if (isDirectory && !other.isDirectory) {
|
return if (isDirectory && !other.isDirectory) {
|
||||||
-1
|
-1
|
||||||
|
|
Loading…
Reference in a new issue