mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
show proper bubble text at sorting by path
This commit is contained in:
@ -41,9 +41,10 @@ data class Directory(val path: String, val tmb: String, val name: String, var me
|
||||
}
|
||||
|
||||
fun getBubbleText() = when {
|
||||
sorting and SORT_BY_NAME != 0 -> name
|
||||
sorting and SORT_BY_PATH != 0 -> path
|
||||
sorting and SORT_BY_SIZE != 0 -> size.formatSize()
|
||||
sorting and SORT_BY_DATE_MODIFIED != 0 -> modified.formatDate()
|
||||
sorting and SORT_BY_DATE_TAKEN != 0 -> taken.formatDate()
|
||||
else -> name
|
||||
else -> taken.formatDate()
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ data class Medium(var name: String, var path: String, val video: Boolean, val mo
|
||||
var result: Int
|
||||
when {
|
||||
sorting and SORT_BY_NAME != 0 -> result = AlphanumericComparator().compare(name.toLowerCase(), other.name.toLowerCase())
|
||||
sorting and SORT_BY_PATH != 0 -> result = AlphanumericComparator().compare(path.toLowerCase(), other.path.toLowerCase())
|
||||
sorting and SORT_BY_SIZE != 0 -> result = when {
|
||||
size == other.size -> 0
|
||||
size > other.size -> 1
|
||||
@ -50,9 +51,10 @@ data class Medium(var name: String, var path: String, val video: Boolean, val mo
|
||||
}
|
||||
|
||||
fun getBubbleText() = when {
|
||||
sorting and SORT_BY_NAME != 0 -> name
|
||||
sorting and SORT_BY_PATH != 0 -> path
|
||||
sorting and SORT_BY_SIZE != 0 -> size.formatSize()
|
||||
sorting and SORT_BY_DATE_MODIFIED != 0 -> modified.formatDate()
|
||||
sorting and SORT_BY_DATE_TAKEN != 0 -> taken.formatDate()
|
||||
else -> name
|
||||
else -> taken.formatDate()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user