diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/activities/SearchResultActivity.java b/app/src/main/java/eu/toldi/infinityforlemmy/activities/SearchResultActivity.java index 6e5636a3..e4f20ba5 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/activities/SearchResultActivity.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/activities/SearchResultActivity.java @@ -784,7 +784,8 @@ public class SearchResultActivity extends BaseActivity implements SortTypeSelect bundle.putString(SubredditListingFragment.EXTRA_QUERY, mQuery); bundle.putBoolean(SubredditListingFragment.EXTRA_IS_GETTING_SUBREDDIT_INFO, false); bundle.putString(SubredditListingFragment.EXTRA_ACCESS_TOKEN, mAccessToken); - bundle.putString(SubredditListingFragment.EXTRA_ACCOUNT_NAME, mAccountQualifiedName); + bundle.putString(SubredditListingFragment.EXTRA_ACCOUNT_NAME, mAccountName); + bundle.putString(SubredditListingFragment.EXTRA_ACCOUNT_QUALIFIED_NAME, mAccountQualifiedName); mFragment.setArguments(bundle); return mFragment; } diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/activities/SearchSubredditsResultActivity.java b/app/src/main/java/eu/toldi/infinityforlemmy/activities/SearchSubredditsResultActivity.java index 59012b6c..b6ebf0be 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/activities/SearchSubredditsResultActivity.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/activities/SearchSubredditsResultActivity.java @@ -119,7 +119,8 @@ public class SearchSubredditsResultActivity extends BaseActivity implements Acti bundle.putString(SubredditListingFragment.EXTRA_QUERY, query); bundle.putBoolean(SubredditListingFragment.EXTRA_IS_GETTING_SUBREDDIT_INFO, true); bundle.putString(SubredditListingFragment.EXTRA_ACCESS_TOKEN, mAccessToken); - bundle.putString(SubredditListingFragment.EXTRA_ACCOUNT_NAME, mAccountQualifiedName); + bundle.putString(SubredditListingFragment.EXTRA_ACCOUNT_NAME, mAccountName); + bundle.putString(SubredditListingFragment.EXTRA_ACCOUNT_QUALIFIED_NAME, mAccountQualifiedName); bundle.putBoolean(SubredditListingFragment.EXTRA_IS_MULTI_SELECTION, getIntent().getBooleanExtra(EXTRA_IS_MULTI_SELECTION, false)); mFragment.setArguments(bundle); } else { diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/fragments/SubredditListingFragment.java b/app/src/main/java/eu/toldi/infinityforlemmy/fragments/SubredditListingFragment.java index 94f74ea4..38a8cb5d 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/fragments/SubredditListingFragment.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/fragments/SubredditListingFragment.java @@ -61,6 +61,7 @@ public class SubredditListingFragment extends Fragment implements FragmentCommun public static final String EXTRA_IS_GETTING_SUBREDDIT_INFO = "EIGSI"; public static final String EXTRA_ACCESS_TOKEN = "EAT"; public static final String EXTRA_ACCOUNT_NAME = "EAN"; + public static final String EXTRA_ACCOUNT_QUALIFIED_NAME = "EAQN"; public static final String EXTRA_IS_MULTI_SELECTION = "EIMS"; @BindView(R.id.coordinator_layout_subreddit_listing_fragment) @@ -135,13 +136,14 @@ public class SubredditListingFragment extends Fragment implements FragmentCommun boolean isGettingSubredditInfo = getArguments().getBoolean(EXTRA_IS_GETTING_SUBREDDIT_INFO); String accessToken = getArguments().getString(EXTRA_ACCESS_TOKEN); String accountName = getArguments().getString(EXTRA_ACCOUNT_NAME); + String accountQualifiedName = getArguments().getString(EXTRA_ACCOUNT_QUALIFIED_NAME); String sort = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TYPE_SEARCH_SUBREDDIT, SortType.Type.TOP_ALL.value); sortType = new SortType(SortType.Type.fromValue(sort)); boolean nsfw = !mSharedPreferences.getBoolean(SharedPreferencesUtils.DISABLE_NSFW_FOREVER, false) && mNsfwAndSpoilerSharedPreferences.getBoolean((accountName == null ? "" : accountName) + SharedPreferencesUtils.NSFW_BASE, false); mAdapter = new SubredditListingRecyclerViewAdapter(mActivity, mExecutor, mRetrofit.getRetrofit(), mRetrofit.getRetrofit(), - mCustomThemeWrapper, accessToken, accountName, + mCustomThemeWrapper, accessToken, accountQualifiedName, mRedditDataRoomDatabase, getArguments().getBoolean(EXTRA_IS_MULTI_SELECTION, false), new SubredditListingRecyclerViewAdapter.Callback() { @Override