Fix regression when filtering emojis

This commit is contained in:
Benoit Marty 2019-11-07 12:23:21 +01:00
parent 96e610970a
commit 98d97e574c
2 changed files with 9 additions and 9 deletions

View file

@ -131,8 +131,8 @@ class EmojiReactionPickerActivity : VectorBaseActivity(),
}
}
supportFragmentManager.findFragmentById(R.id.fragment)?.view?.isVisible = true
supportFragmentManager.findFragmentById(R.id.searchFragment)?.view?.isInvisible = true
emojiPickerWholeListFragmentContainer.isVisible = true
emojiPickerFilteredListFragmentContainer.isVisible = false
tabLayout.isVisible = true
}
@ -195,13 +195,13 @@ class EmojiReactionPickerActivity : VectorBaseActivity(),
private fun onQueryText(query: String) {
if (query.isEmpty()) {
supportFragmentManager.findFragmentById(R.id.fragment)?.view?.isVisible = true
supportFragmentManager.findFragmentById(R.id.searchFragment)?.view?.isInvisible = true
tabLayout.isVisible = true
emojiPickerWholeListFragmentContainer.isVisible = true
emojiPickerFilteredListFragmentContainer.isVisible = false
} else {
tabLayout.isVisible = false
supportFragmentManager.findFragmentById(R.id.fragment)?.view?.isInvisible = true
supportFragmentManager.findFragmentById(R.id.searchFragment)?.view?.isVisible = true
emojiPickerWholeListFragmentContainer.isVisible = false
emojiPickerFilteredListFragmentContainer.isVisible = true
searchResultViewModel.updateQuery(query)
}
}

View file

@ -7,7 +7,7 @@
tools:context="im.vector.riotx.features.reactions.EmojiReactionPickerActivity">
<androidx.fragment.app.FragmentContainerView
android:id="@+id/fragment"
android:id="@+id/emojiPickerWholeListFragmentContainer"
android:name="im.vector.riotx.features.reactions.EmojiChooserFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -15,12 +15,12 @@
tools:layout="@layout/emoji_chooser_fragment" />
<androidx.fragment.app.FragmentContainerView
android:id="@+id/searchFragment"
android:id="@+id/emojiPickerFilteredListFragmentContainer"
android:name="im.vector.riotx.features.reactions.EmojiSearchResultFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:visibility="invisible" />
android:visibility="gone" />
<com.google.android.material.appbar.AppBarLayout
style="@style/VectorAppBarLayoutStyle"