mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-06-05 17:00:23 +02:00
sort notes properly, including accents
This commit is contained in:
@ -64,10 +64,12 @@ class CollatorBasedComparator: Comparator<String> {
|
||||
chunk.append(c)
|
||||
current++
|
||||
}
|
||||
|
||||
return chunk.toString()
|
||||
}
|
||||
|
||||
private fun isDigit(ch: Char) = ch in '0'..'9'
|
||||
|
||||
private fun coerceResult(compareToResult: Int) = compareToResult.coerceIn(-1, 1)
|
||||
|
||||
private fun getCollator(): Collator {
|
||||
|
@ -5,7 +5,7 @@ import com.simplemobiletools.notes.pro.models.Note
|
||||
|
||||
@Dao
|
||||
interface NotesDao {
|
||||
@Query("SELECT * FROM notes ORDER BY title COLLATE NOCASE ASC")
|
||||
@Query("SELECT * FROM notes ORDER BY title COLLATE UNICODE ASC ")
|
||||
fun getNotes(): List<Note>
|
||||
|
||||
@Query("SELECT * FROM notes WHERE id = :id")
|
||||
|
Reference in New Issue
Block a user