mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 09:17:44 +00:00
Minor refactoring
This commit is contained in:
parent
4cc22608aa
commit
4d7b179008
@ -57,15 +57,15 @@ class ContactSelectionListFragment : Fragment(), LoaderManager.LoaderCallbacks<L
|
||||
LoaderManager.getInstance(this).initLoader(0, null, this)
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
return inflater.inflate(R.layout.contact_selection_list_fragment, container, false)
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
super.onStop()
|
||||
LoaderManager.getInstance(this).destroyLoader(0)
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
return inflater.inflate(R.layout.contact_selection_list_fragment, container, false)
|
||||
}
|
||||
|
||||
fun setQueryFilter(filter: String?) {
|
||||
cursorFilter = filter
|
||||
LoaderManager.getInstance(this).restartLoader(0, null, this)
|
||||
@ -101,7 +101,7 @@ class ContactSelectionListFragment : Fragment(), LoaderManager.LoaderCallbacks<L
|
||||
private fun update(items: List<ContactSelectionListItem>) {
|
||||
if (activity?.isDestroyed == true) {
|
||||
Log.e(ContactSelectionListFragment::class.java.name,
|
||||
"Received a loader callback after the fragment was detached from an activity.",
|
||||
"Received a loader callback after the fragment was detached from the activity.",
|
||||
IllegalStateException())
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user