File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
app/src/main/kotlin/com/simplemobiletools/notes/pro Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import java.text.Collator
7
7
*
8
8
* Adapted from AlphanumericComparator to support numerical collation.
9
9
*/
10
- class CollatorBasedComparator : Comparator <String > {
10
+ class CollatorBasedComparator : Comparator <String > {
11
11
override fun compare (string1 : String , string2 : String ): Int {
12
12
val collator = getCollator()
13
13
@@ -64,10 +64,12 @@ class CollatorBasedComparator: Comparator<String> {
64
64
chunk.append(c)
65
65
current++
66
66
}
67
+
67
68
return chunk.toString()
68
69
}
69
70
70
71
private fun isDigit (ch : Char ) = ch in ' 0' .. ' 9'
72
+
71
73
private fun coerceResult (compareToResult : Int ) = compareToResult.coerceIn(- 1 , 1 )
72
74
73
75
private fun getCollator (): Collator {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import com.simplemobiletools.notes.pro.models.Note
5
5
6
6
@Dao
7
7
interface NotesDao {
8
- @Query(" SELECT * FROM notes ORDER BY title COLLATE NOCASE ASC" )
8
+ @Query(" SELECT * FROM notes ORDER BY title COLLATE UNICODE ASC " )
9
9
fun getNotes (): List <Note >
10
10
11
11
@Query(" SELECT * FROM notes WHERE id = :id" )
You can’t perform that action at this time.
0 commit comments