From 842368d0f415d19682631a14a3a1ac74c4dc734c Mon Sep 17 00:00:00 2001 From: merkost Date: Sat, 22 Jul 2023 00:14:55 +1000 Subject: [PATCH] Split lines in MessagesReader --- .../smsmessenger/helpers/MessagesReader.kt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/MessagesReader.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/MessagesReader.kt index 809e3325..eacd4345 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/MessagesReader.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/MessagesReader.kt @@ -17,9 +17,7 @@ import java.io.InputStream class MessagesReader(private val context: Context) { fun getMessagesToExport( - getSms: Boolean, - getMms: Boolean, - callback: (messages: List) -> Unit + getSms: Boolean, getMms: Boolean, callback: (messages: List) -> Unit ) { val conversationIds = context.getConversationIds() var smsMessages = listOf() @@ -36,7 +34,17 @@ class MessagesReader(private val context: Context) { private fun getSmsMessages(threadIds: List): List { val projection = arrayOf( - Sms.SUBSCRIPTION_ID, Sms.ADDRESS, Sms.BODY, Sms.DATE, Sms.DATE_SENT, Sms.LOCKED, Sms.PROTOCOL, Sms.READ, Sms.STATUS, Sms.TYPE, Sms.SERVICE_CENTER + Sms.SUBSCRIPTION_ID, + Sms.ADDRESS, + Sms.BODY, + Sms.DATE, + Sms.DATE_SENT, + Sms.LOCKED, + Sms.PROTOCOL, + Sms.READ, + Sms.STATUS, + Sms.TYPE, + Sms.SERVICE_CENTER ) val selection = "${Sms.THREAD_ID} = ?"