Commit 15c56e83 by zhangchengbo

feat:删除最近联系人列表展示

parent aa5d4754
......@@ -122,7 +122,25 @@ class NewConversationActivity : SimpleActivity() {
}
private fun fetchContacts() {
fillSuggestedContacts {
/*fillSuggestedContacts {
SimpleContactsHelper(this).getAvailableContacts(false) {
allContacts = it
if (privateContacts.isNotEmpty()) {
allContacts.addAll(privateContacts)
allContacts.sort()
}
runOnUiThread {
setupAdapter(allContacts)
}
}
}*/
ensureBackgroundThread {
val privateCursor = getMyContactsCursor(favoritesOnly = false, withPhoneNumbersOnly = true)
privateContacts = MyContactsContentProvider.getSimpleContacts(this, privateCursor)
SimpleContactsHelper(this).getAvailableContacts(false) {
allContacts = it
......@@ -136,6 +154,7 @@ class NewConversationActivity : SimpleActivity() {
}
}
}
}
private fun setupAdapter(contacts: ArrayList<SimpleContact>) {
......@@ -196,7 +215,7 @@ class NewConversationActivity : SimpleActivity() {
val privateCursor = getMyContactsCursor(favoritesOnly = false, withPhoneNumbersOnly = true)
ensureBackgroundThread {
privateContacts = MyContactsContentProvider.getSimpleContacts(this, privateCursor)
val suggestions = getSuggestedContacts(privateContacts)
val suggestions: java.util.ArrayList<SimpleContact> = getSuggestedContacts(privateContacts)
runOnUiThread {
binding.suggestionsHolder.removeAllViews()
if (suggestions.isEmpty()) {
......
......@@ -84,6 +84,7 @@
android:id="@+id/suggestions_label"
style="@style/MaterialSectionLabelStyle"
android:layout_width="wrap_content"
android:visibility="gone"
android:layout_height="wrap_content"
android:layout_below="@+id/add_contact_divider"
android:layout_marginStart="@dimen/activity_margin"
......@@ -95,6 +96,7 @@
android:id="@+id/suggestions_scrollview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:layout_below="@+id/suggestions_label"
android:layout_marginBottom="@dimen/medium_margin"
android:overScrollMode="never"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment