show 100 latest messages, not oldest
This commit is contained in:
parent
d5c9cd5cee
commit
23203620ef
|
@ -56,7 +56,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:5.27.0'
|
||||
implementation 'com.simplemobiletools:commons:5.27.2'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
|
||||
implementation 'org.greenrobot:eventbus:3.2.0'
|
||||
implementation 'com.klinkerapps:android-smsmms:5.2.6'
|
||||
|
|
|
@ -54,7 +54,7 @@ fun Context.getMessages(threadId: Int): ArrayList<Message> {
|
|||
|
||||
val selection = "${Sms.THREAD_ID} = ?"
|
||||
val selectionArgs = arrayOf(threadId.toString())
|
||||
val sortOrder = "${Sms._ID} LIMIT 100"
|
||||
val sortOrder = "${Sms._ID} DESC LIMIT 100"
|
||||
|
||||
var messages = ArrayList<Message>()
|
||||
queryCursor(uri, projection, selection, selectionArgs, sortOrder, showErrors = true) { cursor ->
|
||||
|
|
Loading…
Reference in New Issue