fix SearchActivity transition animations (#2464)

This commit is contained in:
Konrad Pozniak 2022-04-28 20:37:46 +02:00 committed by GitHub
parent 671d2c6a45
commit 28ac190212
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 4 deletions

View File

@ -84,6 +84,10 @@ class SearchActivity : BottomSheetActivity(), HasAndroidInjector {
return true return true
} }
override fun finish() {
super.finishWithoutSlideOutAnimation()
}
private fun getPageTitle(position: Int): CharSequence { private fun getPageTitle(position: Int): CharSequence {
return when (position) { return when (position) {
0 -> getString(R.string.title_posts) 0 -> getString(R.string.title_posts)

View File

@ -111,9 +111,13 @@ abstract class SearchFragment<T : Any> :
} }
} }
override fun onViewAccount(id: String) = startActivity(AccountActivity.getIntent(requireContext(), id)) override fun onViewAccount(id: String) {
bottomSheetActivity?.startActivityWithSlideInAnimation(AccountActivity.getIntent(requireContext(), id))
}
override fun onViewTag(tag: String) = startActivity(StatusListActivity.newHashtagIntent(requireContext(), tag)) override fun onViewTag(tag: String) {
bottomSheetActivity?.startActivityWithSlideInAnimation(StatusListActivity.newHashtagIntent(requireContext(), tag))
}
override fun onViewUrl(url: String) { override fun onViewUrl(url: String) {
bottomSheetActivity?.viewUrl(url) bottomSheetActivity?.viewUrl(url)

View File

@ -219,7 +219,7 @@ class SearchStatusesFragment : SearchFragment<StatusViewData.Concrete>(), Status
replyingStatusContent = status.content.toString() replyingStatusContent = status.content.toString()
) )
) )
startActivity(intent) bottomSheetActivity?.startActivityWithSlideInAnimation(intent)
} }
private fun more(status: Status, view: View, position: Int) { private fun more(status: Status, view: View, position: Int) {

View File

@ -38,7 +38,7 @@ public interface StatusActionListener extends LinkListener {
void onOpenReblog(int position); void onOpenReblog(int position);
void onExpandedChange(boolean expanded, int position); void onExpandedChange(boolean expanded, int position);
void onContentHiddenChange(boolean isShowing, int position); void onContentHiddenChange(boolean isShowing, int position);
void onLoadMore(int position); void onLoadMore(int position);
/** /**
* Called when the status {@link android.widget.ToggleButton} responsible for collapsing long * Called when the status {@link android.widget.ToggleButton} responsible for collapsing long