mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-30 21:07:11 +01:00
Fix showing wrong post feed in the second tab in MainActivity.
This commit is contained in:
parent
56d82d133f
commit
0107bba62a
@ -1616,10 +1616,6 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
|
|||||||
int postType = mMainActivityTabsSharedPreferences.getInt((mAccountName == null ? "" : mAccountName) + SharedPreferencesUtils.MAIN_PAGE_TAB_1_POST_TYPE, SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_HOME);
|
int postType = mMainActivityTabsSharedPreferences.getInt((mAccountName == null ? "" : mAccountName) + SharedPreferencesUtils.MAIN_PAGE_TAB_1_POST_TYPE, SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_HOME);
|
||||||
String name = mMainActivityTabsSharedPreferences.getString((mAccountName == null ? "" : mAccountName) + SharedPreferencesUtils.MAIN_PAGE_TAB_1_NAME, "");
|
String name = mMainActivityTabsSharedPreferences.getString((mAccountName == null ? "" : mAccountName) + SharedPreferencesUtils.MAIN_PAGE_TAB_1_NAME, "");
|
||||||
return generatePostFragment(postType, name);
|
return generatePostFragment(postType, name);
|
||||||
} else if (position == 1) {
|
|
||||||
int postType = mMainActivityTabsSharedPreferences.getInt((mAccountName == null ? "" : mAccountName) + SharedPreferencesUtils.MAIN_PAGE_TAB_2_POST_TYPE, SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_POPULAR);
|
|
||||||
String name = mMainActivityTabsSharedPreferences.getString((mAccountName == null ? "" : mAccountName) + SharedPreferencesUtils.MAIN_PAGE_TAB_2_NAME, "");
|
|
||||||
return generatePostFragment(postType, name);
|
|
||||||
} else {
|
} else {
|
||||||
if (showFavoriteMultiReddits) {
|
if (showFavoriteMultiReddits) {
|
||||||
if (position >= tabCount && position - tabCount < favoriteMultiReddits.size()) {
|
if (position >= tabCount && position - tabCount < favoriteMultiReddits.size()) {
|
||||||
@ -1656,8 +1652,16 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
|
|||||||
return generatePostFragment(postType, name);
|
return generatePostFragment(postType, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int postType = mMainActivityTabsSharedPreferences.getInt((mAccountName == null ? "" : mAccountName) + SharedPreferencesUtils.MAIN_PAGE_TAB_3_POST_TYPE, SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_ALL);
|
|
||||||
String name = mMainActivityTabsSharedPreferences.getString((mAccountName == null ? "" : mAccountName) + SharedPreferencesUtils.MAIN_PAGE_TAB_3_NAME, "");
|
int postType;
|
||||||
|
String name;
|
||||||
|
if (position == 1) {
|
||||||
|
postType = mMainActivityTabsSharedPreferences.getInt((mAccountName == null ? "" : mAccountName) + SharedPreferencesUtils.MAIN_PAGE_TAB_2_POST_TYPE, SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_POPULAR);
|
||||||
|
name = mMainActivityTabsSharedPreferences.getString((mAccountName == null ? "" : mAccountName) + SharedPreferencesUtils.MAIN_PAGE_TAB_2_NAME, "");
|
||||||
|
} else {
|
||||||
|
postType = mMainActivityTabsSharedPreferences.getInt((mAccountName == null ? "" : mAccountName) + SharedPreferencesUtils.MAIN_PAGE_TAB_3_POST_TYPE, SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_ALL);
|
||||||
|
name = mMainActivityTabsSharedPreferences.getString((mAccountName == null ? "" : mAccountName) + SharedPreferencesUtils.MAIN_PAGE_TAB_3_NAME, "");
|
||||||
|
}
|
||||||
return generatePostFragment(postType, name);
|
return generatePostFragment(postType, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,12 +7,6 @@
|
|||||||
android:id="@+id/coordinator_layout_view_subreddit_detail_activity"
|
android:id="@+id/coordinator_layout_view_subreddit_detail_activity"
|
||||||
tools:application=".Activity.ViewSubredditDetailActivity">
|
tools:application=".Activity.ViewSubredditDetailActivity">
|
||||||
|
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
|
||||||
android:id="@+id/view_pager_view_subreddit_detail_activity"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/appbar_layout_view_subreddit_detail_activity"
|
android:id="@+id/appbar_layout_view_subreddit_detail_activity"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -172,6 +166,12 @@
|
|||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
|
android:id="@+id/view_pager_view_subreddit_detail_activity"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||||
|
|
||||||
<include
|
<include
|
||||||
layout="@layout/bottom_app_bar"
|
layout="@layout/bottom_app_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -7,12 +7,6 @@
|
|||||||
android:id="@+id/coordinator_layout_view_user_detail_activity"
|
android:id="@+id/coordinator_layout_view_user_detail_activity"
|
||||||
tools:application=".ViewUserDetailActivity">
|
tools:application=".ViewUserDetailActivity">
|
||||||
|
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
|
||||||
android:id="@+id/view_pager_view_user_detail_activity"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/appbar_layout_view_user_detail"
|
android:id="@+id/appbar_layout_view_user_detail"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -139,6 +133,12 @@
|
|||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
|
android:id="@+id/view_pager_view_user_detail_activity"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||||
|
|
||||||
<include
|
<include
|
||||||
layout="@layout/bottom_app_bar"
|
layout="@layout/bottom_app_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Loading…
Reference in New Issue
Block a user