let the models convert themselves to strings
This commit is contained in:
parent
774f9d691b
commit
04339ac28b
2 changed files with 2 additions and 7 deletions
|
@ -5,7 +5,7 @@ import com.simplemobiletools.gallery.helpers.SORT_BY_NAME
|
|||
import com.simplemobiletools.gallery.helpers.SORT_BY_SIZE
|
||||
import com.simplemobiletools.gallery.helpers.SORT_DESCENDING
|
||||
|
||||
class Directory(val path: String, val thumbnail: String, val name: String, var mediaCnt: Int, val date_modified: Long, val date_taken: Long,
|
||||
data class Directory(val path: String, val thumbnail: String, val name: String, var mediaCnt: Int, val date_modified: Long, val date_taken: Long,
|
||||
var size: Long) : Comparable<Directory> {
|
||||
companion object {
|
||||
var sorting: Int = 0
|
||||
|
@ -47,7 +47,4 @@ class Directory(val path: String, val thumbnail: String, val name: String, var m
|
|||
}
|
||||
return res
|
||||
}
|
||||
|
||||
override fun toString() = "Directory {path=$path, thumbnail=$thumbnail, name=$name, mediaCnt=$mediaCnt, date_modified=$date_modified, " +
|
||||
"date_taken=$date_taken, size $size}"
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.simplemobiletools.gallery.helpers.SORT_BY_SIZE
|
|||
import com.simplemobiletools.gallery.helpers.SORT_DESCENDING
|
||||
import java.io.Serializable
|
||||
|
||||
class Medium(val name: String, var path: String, val isVideo: Boolean, val date_modified: Long, val date_taken: Long, val size: Long) : Serializable, Comparable<Medium> {
|
||||
data class Medium(val name: String, var path: String, val isVideo: Boolean, val date_modified: Long, val date_taken: Long, val size: Long) : Serializable, Comparable<Medium> {
|
||||
companion object {
|
||||
private val serialVersionUID = -6553149466975455L
|
||||
var sorting: Int = 0
|
||||
|
@ -52,6 +52,4 @@ class Medium(val name: String, var path: String, val isVideo: Boolean, val date_
|
|||
}
|
||||
return res
|
||||
}
|
||||
|
||||
override fun toString() = "Medium {name=$name, path=$path, isVideo=$isVideo, date_modified=$date_modified, date_taken=$date_taken, size=$size}"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue