minor edits

This commit is contained in:
tibbi 2017-03-19 19:02:59 +01:00
parent aef03e7aae
commit 2c48df109a
2 changed files with 9 additions and 8 deletions

View file

@ -18,25 +18,25 @@ data class Directory(val path: String, val thumbnail: String, val name: String,
} }
override fun compareTo(other: Directory): Int { override fun compareTo(other: Directory): Int {
var res: Int var result: Int
if (sorting and SORT_BY_NAME != 0) { if (sorting and SORT_BY_NAME != 0) {
res = name.toLowerCase().compareTo(other.name.toLowerCase()) result = name.toLowerCase().compareTo(other.name.toLowerCase())
} else if (sorting and SORT_BY_SIZE != 0) { } else if (sorting and SORT_BY_SIZE != 0) {
res = if (size == other.size) result = if (size == other.size)
0 0
else if (size > other.size) else if (size > other.size)
1 1
else else
-1 -1
} else if (sorting and SORT_BY_DATE_MODIFIED != 0) { } else if (sorting and SORT_BY_DATE_MODIFIED != 0) {
res = if (date_modified == other.date_modified) result = if (date_modified == other.date_modified)
0 0
else if (date_modified > other.date_modified) else if (date_modified > other.date_modified)
1 1
else else
-1 -1
} else { } else {
res = if (date_taken == other.date_taken) result = if (date_taken == other.date_taken)
0 0
else if (date_taken > other.date_taken) else if (date_taken > other.date_taken)
1 1
@ -45,8 +45,8 @@ data class Directory(val path: String, val thumbnail: String, val name: String,
} }
if (sorting and SORT_DESCENDING != 0) { if (sorting and SORT_DESCENDING != 0) {
res *= -1 result *= -1
} }
return res return result
} }
} }

View file

@ -34,7 +34,8 @@
<string name="release_54">Added an option to loop videos automatically</string> <string name="release_54">Added an option to loop videos automatically</string>
<string name="release_52"> <string name="release_52">
Added more color customization options\n Added more color customization options\n
Your settings have been cleared, please reset them</string> Your settings have been cleared, please reset them
</string>
<string name="release_51">Allow changing the column count with pinch gestures</string> <string name="release_51">Allow changing the column count with pinch gestures</string>
<string name="release_50">Added an option to display images or videos only</string> <string name="release_50">Added an option to display images or videos only</string>
<string name="release_49">Added a Select all button at selecting media and folders</string> <string name="release_49">Added a Select all button at selecting media and folders</string>