Skip to content
Merged
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 @@ -91,7 +91,7 @@ class InsertOrEditContactActivity : SimpleActivity(), RefreshContactsListener {

binding.insertEditMenu.onSearchClosedListener = {
getAllFragments().forEach {
it.onSearchClosed()
it?.onSearchClosed()
}
}

Expand Down Expand Up @@ -139,7 +139,7 @@ class InsertOrEditContactActivity : SimpleActivity(), RefreshContactsListener {
override fun onPageSelected(position: Int) {
binding.insertEditTabsHolder.getTabAt(position)?.select()
getAllFragments().forEach {
it.finishActMode()
it?.finishActMode()
}
}
})
Expand Down Expand Up @@ -199,7 +199,12 @@ class InsertOrEditContactActivity : SimpleActivity(), RefreshContactsListener {
}
}

private fun getAllFragments() = arrayListOf<MyViewPagerFragment<*>>(findViewById(R.id.contacts_fragment), findViewById(R.id.favorites_fragment))
private fun getAllFragments(): ArrayList<MyViewPagerFragment<*>?> {
return arrayListOf<MyViewPagerFragment<*>?>(
findViewById(R.id.contacts_fragment),
findViewById(R.id.favorites_fragment)
)
}

private fun setupTabColors() {
val activeView = binding.insertEditTabsHolder.getTabAt(binding.viewPager.currentItem)?.customView
Expand Down
Loading