Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ class ContactsFragment : Fragment(), ContactsView {

private lateinit var contactsAdapter: ContactsRecyclerViewAdapter
private lateinit var recyclerView: RecyclerView
private var emptyTextView: TextView? = null
private var fab: View? = null

private lateinit var selectedContactsRecyclerView: RecyclerView
Expand Down Expand Up @@ -162,7 +161,6 @@ class ContactsFragment : Fragment(), ContactsView {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)

emptyTextView = view.findViewById(R.id.text_no_contacts_to_display)
recyclerView = view.findViewById(R.id.contacts_recycler_view)

contactsAdapter = ContactsRecyclerViewAdapter(this, presenter, finalList)
Expand Down Expand Up @@ -398,7 +396,6 @@ class ContactsFragment : Fragment(), ContactsView {
private fun getContactListWhenSynced() {
// Show loading while sync in progress
recyclerView.visibility = View.GONE
emptyTextView!!.visibility = View.GONE

val serverUrl = serverInteractor.get()!!
val dbManager = dbFactory.create(serverUrl)
Expand Down Expand Up @@ -444,13 +441,7 @@ class ContactsFragment : Fragment(), ContactsView {

private fun setupFrameLayout(filteredContactArrayList: ArrayList<Contact>, spotlightResult: ArrayList<ItemHolder<*>>? = null) {
loadedOnce = true
if (filteredContactArrayList.size == 0 && ((spotlightResult == null) or (spotlightResult?.size == 0))) {
emptyTextView!!.visibility = View.VISIBLE
recyclerView.visibility = View.GONE
} else {
emptyTextView!!.visibility = View.GONE
setUpNewList(map(filteredContactArrayList, spotlightResult))
}
setUpNewList(map(filteredContactArrayList, spotlightResult))
}

private fun setupFrameLayout(spotlightResult: ArrayList<ItemHolder<*>>? = null) {
Expand Down
13 changes: 0 additions & 13 deletions app/src/main/res/layout/fragment_contact_parent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,6 @@
app:layout_constraintBottom_toBottomOf="parent"
tools:listitem="@layout/item_contact" />

<TextView
android:id="@+id/text_no_contacts_to_display"
style="@style/TextAppearance.AppCompat.Subhead"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/msg_no_contacts_to_display"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />

<View
android:id="@+id/divider3"
android:layout_width="match_parent"
Expand Down