From bc5e40bef35089d4153347ae1931aa689e142e33 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 6 Apr 2020 20:25:01 +0200 Subject: [PATCH] removing a helper context extension function --- .../smsmessenger/extensions/Context.kt | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt index 59b74882..3900a502 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt @@ -3,7 +3,6 @@ package com.simplemobiletools.smsmessenger.extensions import android.annotation.SuppressLint import android.content.ContentValues import android.content.Context -import android.content.Intent import android.database.Cursor import android.provider.ContactsContract import android.provider.ContactsContract.CommonDataKinds @@ -12,21 +11,12 @@ import android.text.TextUtils import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.PERMISSION_READ_CONTACTS import com.simplemobiletools.commons.helpers.isMarshmallowPlus -import com.simplemobiletools.smsmessenger.activities.ThreadActivity import com.simplemobiletools.smsmessenger.helpers.Config -import com.simplemobiletools.smsmessenger.helpers.THREAD_ID import com.simplemobiletools.smsmessenger.models.Message import com.simplemobiletools.smsmessenger.models.MessagingThread val Context.config: Config get() = Config.newInstance(applicationContext) -fun Context.launchThreadActivity(id: Int) { - Intent(this, ThreadActivity::class.java).apply { - putExtra(THREAD_ID, id) - startActivity(this) - } -} - fun Context.getMessages(threadID: Int? = null): ArrayList { val messages = ArrayList() val hasContactsPermission = hasPermission(PERMISSION_READ_CONTACTS)