list privately stored contacts at the New Conversation too
This commit is contained in:
parent
2a8b357815
commit
2344a49b26
1 changed files with 8 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ import android.view.Menu
|
|||
import android.view.WindowManager
|
||||
import com.reddit.indicatorfastscroll.FastScrollItemIndicator
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.MyContactsContentProvider
|
||||
import com.simplemobiletools.commons.helpers.PERMISSION_READ_CONTACTS
|
||||
import com.simplemobiletools.commons.helpers.SimpleContactsHelper
|
||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||
|
|
@ -103,9 +104,16 @@ class NewConversationActivity : SimpleActivity() {
|
|||
|
||||
private fun fetchContacts() {
|
||||
fillSuggestedContacts {
|
||||
val privateCursor = getMyContactsContentProviderCursorLoader().loadInBackground()
|
||||
SimpleContactsHelper(this).getAvailableContacts(false) {
|
||||
allContacts = it
|
||||
|
||||
val privateContacts = MyContactsContentProvider.getSimpleContacts(this, privateCursor)
|
||||
if (privateContacts.isNotEmpty()) {
|
||||
allContacts.addAll(privateContacts)
|
||||
allContacts.sort()
|
||||
}
|
||||
|
||||
runOnUiThread {
|
||||
setupAdapter(allContacts)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue