mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-06-05 22:09:15 +02:00
moving some ListItem functions into Commons
This commit is contained in:
@ -1,20 +1,6 @@
|
||||
package com.simplemobiletools.filemanager.pro.models
|
||||
|
||||
import com.bumptech.glide.signature.ObjectKey
|
||||
import com.simplemobiletools.commons.models.FileDirItem
|
||||
import java.io.File
|
||||
|
||||
data class ListItem(val mPath: String, val mName: String = "", var mIsDirectory: Boolean = false, var mChildren: Int = 0, var mSize: Long = 0L, var mModified: Long = 0L,
|
||||
var isSectionTitle: Boolean) : FileDirItem(mPath, mName, mIsDirectory, mChildren, mSize, mModified) {
|
||||
fun getSignature(): String {
|
||||
val lastModified = if (modified > 1) {
|
||||
modified
|
||||
} else {
|
||||
File(path).lastModified()
|
||||
}
|
||||
|
||||
return "$path-$lastModified-$size"
|
||||
}
|
||||
|
||||
fun getKey() = ObjectKey(getSignature())
|
||||
}
|
||||
var isSectionTitle: Boolean) : FileDirItem(mPath, mName, mIsDirectory, mChildren, mSize, mModified)
|
||||
|
Reference in New Issue
Block a user