Skip to content

Commit 6143998

Browse files
committed
moving some ListItem functions into Commons
1 parent 112b816 commit 6143998

File tree

1 file changed

+1
-15
lines changed
  • app/src/main/kotlin/com/simplemobiletools/filemanager/pro/models

1 file changed

+1
-15
lines changed
Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
package com.simplemobiletools.filemanager.pro.models
22

3-
import com.bumptech.glide.signature.ObjectKey
43
import com.simplemobiletools.commons.models.FileDirItem
5-
import java.io.File
64

75
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,
8-
var isSectionTitle: Boolean) : FileDirItem(mPath, mName, mIsDirectory, mChildren, mSize, mModified) {
9-
fun getSignature(): String {
10-
val lastModified = if (modified > 1) {
11-
modified
12-
} else {
13-
File(path).lastModified()
14-
}
15-
16-
return "$path-$lastModified-$size"
17-
}
18-
19-
fun getKey() = ObjectKey(getSignature())
20-
}
6+
var isSectionTitle: Boolean) : FileDirItem(mPath, mName, mIsDirectory, mChildren, mSize, mModified)

0 commit comments

Comments
 (0)