mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-27 18:14:45 +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.SearchPostSortTypeBottomSheetFragment;
|
||||||
import eu.toldi.infinityforlemmy.bottomsheetfragments.SearchUserAndSubredditSortTypeBottomSheetFragment;
|
import eu.toldi.infinityforlemmy.bottomsheetfragments.SearchUserAndSubredditSortTypeBottomSheetFragment;
|
||||||
import eu.toldi.infinityforlemmy.bottomsheetfragments.SortTimeBottomSheetFragment;
|
import eu.toldi.infinityforlemmy.bottomsheetfragments.SortTimeBottomSheetFragment;
|
||||||
|
import eu.toldi.infinityforlemmy.bottomsheetfragments.SortTypeBottomSheetFragment;
|
||||||
import eu.toldi.infinityforlemmy.customtheme.CustomThemeWrapper;
|
import eu.toldi.infinityforlemmy.customtheme.CustomThemeWrapper;
|
||||||
import eu.toldi.infinityforlemmy.customviews.slidr.Slidr;
|
import eu.toldi.infinityforlemmy.customviews.slidr.Slidr;
|
||||||
import eu.toldi.infinityforlemmy.events.ChangeNSFWEvent;
|
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: {
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_SORT_TYPE: {
|
||||||
Fragment fragment = sectionsPagerAdapter.getCurrentFragment();
|
Fragment fragment = sectionsPagerAdapter.getCurrentFragment();
|
||||||
if (fragment instanceof PostFragment) {
|
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());
|
searchPostSortTypeBottomSheetFragment.show(getSupportFragmentManager(), searchPostSortTypeBottomSheetFragment.getTag());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -402,7 +403,7 @@ public class SearchResultActivity extends BaseActivity implements SortTypeSelect
|
|||||||
private void displaySortTypeBottomSheetFragment() {
|
private void displaySortTypeBottomSheetFragment() {
|
||||||
Fragment fragment = sectionsPagerAdapter.getCurrentFragment();
|
Fragment fragment = sectionsPagerAdapter.getCurrentFragment();
|
||||||
if (fragment instanceof PostFragment) {
|
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());
|
searchPostSortTypeBottomSheetFragment.show(getSupportFragmentManager(), searchPostSortTypeBottomSheetFragment.getTag());
|
||||||
} else {
|
} else {
|
||||||
if (fragment instanceof SubredditListingFragment) {
|
if (fragment instanceof SubredditListingFragment) {
|
||||||
|
@ -108,6 +108,7 @@ public class SortTypeBottomSheetFragment extends LandscapeExpandedRoundedBottomS
|
|||||||
default:
|
default:
|
||||||
case PAGE_TYPE_COMMUNITY:
|
case PAGE_TYPE_COMMUNITY:
|
||||||
case PAGE_TYPE_FRONT_PAGE:
|
case PAGE_TYPE_FRONT_PAGE:
|
||||||
|
case PAGE_TYPE_SEARCH:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user