diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/models/Directory.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/models/Directory.kt index c9be8d77a..a87dd4737 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/models/Directory.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/models/Directory.kt @@ -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 { 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}" } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/models/Medium.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/models/Medium.kt index eaf55074a..dd857bb5a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/models/Medium.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/models/Medium.kt @@ -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 { +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 { 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}" }