show 100 latest messages, not oldest
This commit is contained in:
parent
d5c9cd5cee
commit
23203620ef
2 changed files with 2 additions and 2 deletions
|
|
@ -56,7 +56,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.27.0'
|
implementation 'com.simplemobiletools:commons:5.27.2'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
|
||||||
implementation 'org.greenrobot:eventbus:3.2.0'
|
implementation 'org.greenrobot:eventbus:3.2.0'
|
||||||
implementation 'com.klinkerapps:android-smsmms:5.2.6'
|
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 selection = "${Sms.THREAD_ID} = ?"
|
||||||
val selectionArgs = arrayOf(threadId.toString())
|
val selectionArgs = arrayOf(threadId.toString())
|
||||||
val sortOrder = "${Sms._ID} LIMIT 100"
|
val sortOrder = "${Sms._ID} DESC LIMIT 100"
|
||||||
|
|
||||||
var messages = ArrayList<Message>()
|
var messages = ArrayList<Message>()
|
||||||
queryCursor(uri, projection, selection, selectionArgs, sortOrder, showErrors = true) { cursor ->
|
queryCursor(uri, projection, selection, selectionArgs, sortOrder, showErrors = true) { cursor ->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue