formatting some code

This commit is contained in:
Tibor Kaputa
2022-11-24 22:46:26 +01:00
committed by GitHub
parent 2e5a18a029
commit 9d90ec13e1

View File

@@ -155,15 +155,15 @@ fun Context.getMMS(threadId: Long? = null, getImageResolutions: Boolean = false,
Mms.STATUS Mms.STATUS
) )
var selection:String? = null var selection: String? = null
var selectionArgs:Array<String>? = null var selectionArgs: Array<String>? = null
if (threadId == null && dateFrom != -1) { if (threadId == null && dateFrom != -1) {
selection = "${Sms.DATE} < ${dateFrom.toLong()}" //Should not multiply 1000 here, because date in mms's database is different from sms's. selection = "${Sms.DATE} < ${dateFrom.toLong()}" //Should not multiply 1000 here, because date in mms's database is different from sms's.
} else if(threadId != null && dateFrom == -1){ } else if (threadId != null && dateFrom == -1) {
selection = "${Sms.THREAD_ID} = ?" selection = "${Sms.THREAD_ID} = ?"
selectionArgs = arrayOf(threadId.toString()) selectionArgs = arrayOf(threadId.toString())
} else if(threadId != null && dateFrom != -1){ } else if (threadId != null && dateFrom != -1) {
selection = "${Sms.THREAD_ID} = ? AND ${Sms.DATE} < ${dateFrom.toLong()}" selection = "${Sms.THREAD_ID} = ? AND ${Sms.DATE} < ${dateFrom.toLong()}"
selectionArgs = arrayOf(threadId.toString()) selectionArgs = arrayOf(threadId.toString())
} }