mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-10 20:57:25 +01:00
Add more options for tabs in MainActivity.
This commit is contained in:
parent
b9bda129cc
commit
67f2ba955f
@ -1455,6 +1455,33 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
|
|||||||
bundle.putString(PostFragment.EXTRA_USER_WHERE, PostDataSource.USER_WHERE_SUBMITTED);
|
bundle.putString(PostFragment.EXTRA_USER_WHERE, PostDataSource.USER_WHERE_SUBMITTED);
|
||||||
bundle.putString(PostFragment.EXTRA_ACCESS_TOKEN, mAccessToken);
|
bundle.putString(PostFragment.EXTRA_ACCESS_TOKEN, mAccessToken);
|
||||||
bundle.putString(PostFragment.EXTRA_ACCOUNT_NAME, mAccountName);
|
bundle.putString(PostFragment.EXTRA_ACCOUNT_NAME, mAccountName);
|
||||||
|
fragment.setArguments(bundle);
|
||||||
|
return fragment;
|
||||||
|
} else if (postType == SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_UPVOTED
|
||||||
|
|| postType == SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_DOWNVOTED
|
||||||
|
|| postType == SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_HIDDEN
|
||||||
|
|| postType == SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_SAVED
|
||||||
|
|| postType == SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_GILDED) {
|
||||||
|
PostFragment fragment = new PostFragment();
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putInt(PostFragment.EXTRA_POST_TYPE, PostDataSource.TYPE_USER);
|
||||||
|
bundle.putString(PostFragment.EXTRA_USER_NAME, mAccountName);
|
||||||
|
bundle.putString(PostFragment.EXTRA_ACCESS_TOKEN, mAccessToken);
|
||||||
|
bundle.putString(PostFragment.EXTRA_ACCOUNT_NAME, mAccountName);
|
||||||
|
bundle.putBoolean(PostFragment.EXTRA_DISABLE_READ_POSTS, true);
|
||||||
|
|
||||||
|
if (postType == SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_UPVOTED) {
|
||||||
|
bundle.putString(PostFragment.EXTRA_USER_WHERE, PostDataSource.USER_WHERE_UPVOTED);
|
||||||
|
} else if (postType == SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_DOWNVOTED) {
|
||||||
|
bundle.putString(PostFragment.EXTRA_USER_WHERE, PostDataSource.USER_WHERE_DOWNVOTED);
|
||||||
|
} else if (postType == SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_HIDDEN) {
|
||||||
|
bundle.putString(PostFragment.EXTRA_USER_WHERE, PostDataSource.USER_WHERE_HIDDEN);
|
||||||
|
} else if (postType == SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_SAVED) {
|
||||||
|
bundle.putString(PostFragment.EXTRA_USER_WHERE, PostDataSource.USER_WHERE_SAVED);
|
||||||
|
} else {
|
||||||
|
bundle.putString(PostFragment.EXTRA_USER_WHERE, PostDataSource.USER_WHERE_GILDED);
|
||||||
|
}
|
||||||
|
|
||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
return fragment;
|
return fragment;
|
||||||
} else {
|
} else {
|
||||||
|
@ -188,6 +188,11 @@ public class SharedPreferencesUtils {
|
|||||||
public static final int MAIN_PAGE_TAB_POST_TYPE_SUBREDDIT = 3;
|
public static final int MAIN_PAGE_TAB_POST_TYPE_SUBREDDIT = 3;
|
||||||
public static final int MAIN_PAGE_TAB_POST_TYPE_MULTIREDDIT = 4;
|
public static final int MAIN_PAGE_TAB_POST_TYPE_MULTIREDDIT = 4;
|
||||||
public static final int MAIN_PAGE_TAB_POST_TYPE_USER = 5;
|
public static final int MAIN_PAGE_TAB_POST_TYPE_USER = 5;
|
||||||
|
public static final int MAIN_PAGE_TAB_POST_TYPE_UPVOTED = 6;
|
||||||
|
public static final int MAIN_PAGE_TAB_POST_TYPE_DOWNVOTED = 7;
|
||||||
|
public static final int MAIN_PAGE_TAB_POST_TYPE_HIDDEN = 8;
|
||||||
|
public static final int MAIN_PAGE_TAB_POST_TYPE_SAVED = 9;
|
||||||
|
public static final int MAIN_PAGE_TAB_POST_TYPE_GILDED = 10;
|
||||||
public static final String MAIN_PAGE_SHOW_SUBSCRIBED_SUBREDDITS = "_main_page_show_subscribed_subreddits";
|
public static final String MAIN_PAGE_SHOW_SUBSCRIBED_SUBREDDITS = "_main_page_show_subscribed_subreddits";
|
||||||
public static final String MAIN_PAGE_SHOW_FAVORITE_SUBSCRIBED_SUBREDDITS = "_main_page_show_favorite_subscribed_subreddits";
|
public static final String MAIN_PAGE_SHOW_FAVORITE_SUBSCRIBED_SUBREDDITS = "_main_page_show_favorite_subscribed_subreddits";
|
||||||
|
|
||||||
|
@ -172,6 +172,11 @@
|
|||||||
<item>Subreddit</item>
|
<item>Subreddit</item>
|
||||||
<item>MultiReddit</item>
|
<item>MultiReddit</item>
|
||||||
<item>User</item>
|
<item>User</item>
|
||||||
|
<item>Upvoted</item>
|
||||||
|
<item>Downvoted</item>
|
||||||
|
<item>Hidden</item>
|
||||||
|
<item>Saved</item>
|
||||||
|
<item>Gilded</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="settings_time_format">
|
<string-array name="settings_time_format">
|
||||||
|
Loading…
Reference in New Issue
Block a user