fill AddFavorite dialog asynchronously
This commit is contained in:
parent
85c303e6dc
commit
bcb062c08a
1 changed files with 13 additions and 13 deletions
|
|
@ -30,6 +30,7 @@ class AddFavoritesDialog(val activity: SimpleActivity, val callback: () -> Unit)
|
|||
allContacts = allContacts.filter { contactSources.contains(it.source) } as ArrayList<Contact>
|
||||
}
|
||||
|
||||
activity.runOnUiThread {
|
||||
view.apply {
|
||||
add_favorites_list.adapter = AddFavoritesAdapter(activity, allContacts, config.favorites)
|
||||
add_favorites_fastscroller.allowBubbleDisplay = activity.baseConfig.showInfoBubble
|
||||
|
|
@ -37,8 +38,9 @@ class AddFavoritesDialog(val activity: SimpleActivity, val callback: () -> Unit)
|
|||
add_favorites_fastscroller.updateBubbleText(allContacts[it].getBubbleText())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
activity.runOnUiThread {
|
||||
dialog = AlertDialog.Builder(activity)
|
||||
.setPositiveButton(R.string.ok, { dialog, which -> dialogConfirmed() })
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
|
|
@ -46,8 +48,6 @@ class AddFavoritesDialog(val activity: SimpleActivity, val callback: () -> Unit)
|
|||
activity.setupDialogStuff(view, this)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun dialogConfirmed() {
|
||||
val allDisplayedIDs = ArrayList<String>()
|
||||
|
|
|
|||
Loading…
Reference in a new issue