mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-12 19:27:12 +01:00
Fix search sorting
Added all sorting options to the SearchResultActivity
This commit is contained in:
parent
1ab8f31cbd
commit
60155c4c6b
@ -62,6 +62,7 @@ import eu.toldi.infinityforlemmy.bottomsheetfragments.RandomBottomSheetFragment;
|
||||
import eu.toldi.infinityforlemmy.bottomsheetfragments.SearchPostSortTypeBottomSheetFragment;
|
||||
import eu.toldi.infinityforlemmy.bottomsheetfragments.SearchUserAndSubredditSortTypeBottomSheetFragment;
|
||||
import eu.toldi.infinityforlemmy.bottomsheetfragments.SortTimeBottomSheetFragment;
|
||||
import eu.toldi.infinityforlemmy.bottomsheetfragments.SortTypeBottomSheetFragment;
|
||||
import eu.toldi.infinityforlemmy.customtheme.CustomThemeWrapper;
|
||||
import eu.toldi.infinityforlemmy.customviews.slidr.Slidr;
|
||||
import eu.toldi.infinityforlemmy.events.ChangeNSFWEvent;
|
||||
@ -336,7 +337,7 @@ public class SearchResultActivity extends BaseActivity implements SortTypeSelect
|
||||
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_SORT_TYPE: {
|
||||
Fragment fragment = sectionsPagerAdapter.getCurrentFragment();
|
||||
if (fragment instanceof PostFragment) {
|
||||
SearchPostSortTypeBottomSheetFragment searchPostSortTypeBottomSheetFragment = SearchPostSortTypeBottomSheetFragment.getNewInstance(((PostFragment) fragment).getSortType());
|
||||
SortTypeBottomSheetFragment searchPostSortTypeBottomSheetFragment = SortTypeBottomSheetFragment.getNewInstance(SortTypeBottomSheetFragment.PAGE_TYPE_SEARCH,((PostFragment) fragment).getSortType());
|
||||
searchPostSortTypeBottomSheetFragment.show(getSupportFragmentManager(), searchPostSortTypeBottomSheetFragment.getTag());
|
||||
}
|
||||
break;
|
||||
@ -402,7 +403,7 @@ public class SearchResultActivity extends BaseActivity implements SortTypeSelect
|
||||
private void displaySortTypeBottomSheetFragment() {
|
||||
Fragment fragment = sectionsPagerAdapter.getCurrentFragment();
|
||||
if (fragment instanceof PostFragment) {
|
||||
SearchPostSortTypeBottomSheetFragment searchPostSortTypeBottomSheetFragment = SearchPostSortTypeBottomSheetFragment.getNewInstance(((PostFragment) fragment).getSortType());
|
||||
SortTypeBottomSheetFragment searchPostSortTypeBottomSheetFragment = SortTypeBottomSheetFragment.getNewInstance(SortTypeBottomSheetFragment.PAGE_TYPE_SEARCH,((PostFragment) fragment).getSortType());
|
||||
searchPostSortTypeBottomSheetFragment.show(getSupportFragmentManager(), searchPostSortTypeBottomSheetFragment.getTag());
|
||||
} else {
|
||||
if (fragment instanceof SubredditListingFragment) {
|
||||
|
@ -108,6 +108,7 @@ public class SortTypeBottomSheetFragment extends LandscapeExpandedRoundedBottomS
|
||||
default:
|
||||
case PAGE_TYPE_COMMUNITY:
|
||||
case PAGE_TYPE_FRONT_PAGE:
|
||||
case PAGE_TYPE_SEARCH:
|
||||
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user