mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-28 20:08:22 +01:00
Try fixing IllegalStateException for fragments in various Activities.
This commit is contained in:
parent
71661e94f0
commit
5c31c21d06
@ -143,10 +143,12 @@ public class AccountPostsActivity extends BaseActivity implements SortTypeSelect
|
||||
mAccessToken = savedInstanceState.getString(ACCESS_TOKEN_STATE);
|
||||
mAccountName = savedInstanceState.getString(ACCOUNT_NAME_STATE);
|
||||
isInLazyMode = savedInstanceState.getBoolean(IS_IN_LAZY_MODE_STATE);
|
||||
mFragment = getSupportFragmentManager().getFragment(savedInstanceState, FRAGMENT_OUT_STATE);
|
||||
getSupportFragmentManager().beginTransaction().replace(R.id.frame_layout_account_posts_activity, mFragment).commit();
|
||||
|
||||
if (!mNullAccessToken && mAccessToken == null) {
|
||||
getCurrentAccountAndInitializeFragment();
|
||||
} else {
|
||||
mFragment = getSupportFragmentManager().getFragment(savedInstanceState, FRAGMENT_OUT_STATE);
|
||||
getSupportFragmentManager().beginTransaction().replace(R.id.frame_layout_account_posts_activity, mFragment).commit();
|
||||
}
|
||||
} else {
|
||||
getCurrentAccountAndInitializeFragment();
|
||||
|
@ -159,12 +159,11 @@ public class FilteredThingActivity extends BaseActivity implements SortTypeSelec
|
||||
mAccessToken = savedInstanceState.getString(ACCESS_TOKEN_STATE);
|
||||
mAccountName = savedInstanceState.getString(ACCOUNT_NAME_STATE);
|
||||
|
||||
mFragment = getSupportFragmentManager().getFragment(savedInstanceState, FRAGMENT_OUT_STATE);
|
||||
getSupportFragmentManager().beginTransaction().replace(R.id.frame_layout_filtered_posts_activity, mFragment).commit();
|
||||
|
||||
if (!mNullAccessToken && mAccessToken == null) {
|
||||
getCurrentAccountAndBindView(filter);
|
||||
} else {
|
||||
mFragment = getSupportFragmentManager().getFragment(savedInstanceState, FRAGMENT_OUT_STATE);
|
||||
getSupportFragmentManager().beginTransaction().replace(R.id.frame_layout_filtered_posts_activity, mFragment).commit();
|
||||
bindView(filter, false);
|
||||
}
|
||||
} else {
|
||||
|
@ -114,6 +114,7 @@ public class SearchSubredditsResultActivity extends BaseActivity implements Acti
|
||||
mNullAccessToken = savedInstanceState.getBoolean(NULL_ACCESS_TOKEN_STATE);
|
||||
mAccessToken = savedInstanceState.getString(ACCESS_TOKEN_STATE);
|
||||
mAccountName = savedInstanceState.getString(ACCOUNT_NAME_STATE);
|
||||
|
||||
if (!mNullAccessToken && mAccessToken == null) {
|
||||
getCurrentAccountAndInitializeFragment(query);
|
||||
} else {
|
||||
|
@ -133,12 +133,11 @@ public class SubredditSelectionActivity extends BaseActivity implements Activity
|
||||
mAccountName = savedInstanceState.getString(ACCOUNT_NAME_STATE);
|
||||
mAccountProfileImageUrl = savedInstanceState.getString(ACCOUNT_PROFILE_IMAGE_URL);
|
||||
|
||||
mFragment = getSupportFragmentManager().getFragment(savedInstanceState, FRAGMENT_OUT_STATE);
|
||||
getSupportFragmentManager().beginTransaction().replace(R.id.frame_layout_subreddit_selection_activity, mFragment).commit();
|
||||
|
||||
if (!mNullAccessToken && mAccountName == null) {
|
||||
getCurrentAccountAndBindView();
|
||||
} else {
|
||||
mFragment = getSupportFragmentManager().getFragment(savedInstanceState, FRAGMENT_OUT_STATE);
|
||||
getSupportFragmentManager().beginTransaction().replace(R.id.frame_layout_subreddit_selection_activity, mFragment).commit();
|
||||
bindView(false);
|
||||
}
|
||||
}
|
||||
|
@ -158,11 +158,11 @@ public class ViewMultiRedditDetailActivity extends BaseActivity implements SortT
|
||||
mAccountName = savedInstanceState.getString(ACCOUNT_NAME_STATE);
|
||||
isInLazyMode = savedInstanceState.getBoolean(IS_IN_LAZY_MODE_STATE);
|
||||
|
||||
mFragment = getSupportFragmentManager().getFragment(savedInstanceState, FRAGMENT_OUT_STATE_KEY);
|
||||
getSupportFragmentManager().beginTransaction().replace(R.id.frame_layout_view_multi_reddit_detail_activity, mFragment).commit();
|
||||
|
||||
if (!mNullAccessToken && mAccessToken == null) {
|
||||
getCurrentAccountAndInitializeFragment();
|
||||
} else {
|
||||
mFragment = getSupportFragmentManager().getFragment(savedInstanceState, FRAGMENT_OUT_STATE_KEY);
|
||||
getSupportFragmentManager().beginTransaction().replace(R.id.frame_layout_view_multi_reddit_detail_activity, mFragment).commit();
|
||||
}
|
||||
} else {
|
||||
getCurrentAccountAndInitializeFragment();
|
||||
|
Loading…
Reference in New Issue
Block a user