let the models convert themselves to strings

This commit is contained in:
tibbi 2016-12-12 21:28:38 +01:00
parent 774f9d691b
commit 04339ac28b
2 changed files with 2 additions and 7 deletions

View File

@ -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}"
}

View File

@ -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}"
}