mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-07 11:17:25 +01:00
Fix some issues related to showing sort type on toolbars.
This commit is contained in:
parent
e9ffe5a13c
commit
ff5691aecb
@ -1375,15 +1375,29 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
|
|||||||
void displaySortTypeInToolbar() {
|
void displaySortTypeInToolbar() {
|
||||||
switch (viewPager.getCurrentItem()) {
|
switch (viewPager.getCurrentItem()) {
|
||||||
case 0:
|
case 0:
|
||||||
if (tab1 != null) {
|
if (mAccessToken != null) {
|
||||||
SortType sortType = tab1.getSortType();
|
if (tab1 != null) {
|
||||||
Utils.displaySortTypeInToolbar(sortType, toolbar);
|
SortType sortType = tab1.getSortType();
|
||||||
|
Utils.displaySortTypeInToolbar(sortType, toolbar);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (tab2 != null) {
|
||||||
|
SortType sortType = tab2.getSortType();
|
||||||
|
Utils.displaySortTypeInToolbar(sortType, toolbar);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (tab2 != null) {
|
if (mAccessToken != null) {
|
||||||
SortType sortType = tab2.getSortType();
|
if (tab2 != null) {
|
||||||
Utils.displaySortTypeInToolbar(sortType, toolbar);
|
SortType sortType = tab2.getSortType();
|
||||||
|
Utils.displaySortTypeInToolbar(sortType, toolbar);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (tab3 != null) {
|
||||||
|
SortType sortType = tab3.getSortType();
|
||||||
|
Utils.displaySortTypeInToolbar(sortType, toolbar);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
@ -345,7 +345,7 @@ public class ViewPostDetailActivity extends BaseActivity implements FlairBottomS
|
|||||||
};
|
};
|
||||||
|
|
||||||
mSingleCommentId = getIntent().getStringExtra(EXTRA_SINGLE_COMMENT_ID);
|
mSingleCommentId = getIntent().getStringExtra(EXTRA_SINGLE_COMMENT_ID);
|
||||||
sortType = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TYPE_POST_COMMENT, SortType.Type.BEST.value);
|
sortType = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TYPE_POST_COMMENT, SortType.Type.BEST.value.toUpperCase());
|
||||||
mToolbar.setTitle(new SortType(SortType.Type.valueOf(sortType)).getType().fullName);
|
mToolbar.setTitle(new SortType(SortType.Type.valueOf(sortType)).getType().fullName);
|
||||||
sortType = sortType.toLowerCase();
|
sortType = sortType.toLowerCase();
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user