mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-01 13:57:10 +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);
|
mAccessToken = savedInstanceState.getString(ACCESS_TOKEN_STATE);
|
||||||
mAccountName = savedInstanceState.getString(ACCOUNT_NAME_STATE);
|
mAccountName = savedInstanceState.getString(ACCOUNT_NAME_STATE);
|
||||||
isInLazyMode = savedInstanceState.getBoolean(IS_IN_LAZY_MODE_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) {
|
if (!mNullAccessToken && mAccessToken == null) {
|
||||||
getCurrentAccountAndInitializeFragment();
|
getCurrentAccountAndInitializeFragment();
|
||||||
|
} else {
|
||||||
|
mFragment = getSupportFragmentManager().getFragment(savedInstanceState, FRAGMENT_OUT_STATE);
|
||||||
|
getSupportFragmentManager().beginTransaction().replace(R.id.frame_layout_account_posts_activity, mFragment).commit();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
getCurrentAccountAndInitializeFragment();
|
getCurrentAccountAndInitializeFragment();
|
||||||
|
@ -159,12 +159,11 @@ public class FilteredThingActivity extends BaseActivity implements SortTypeSelec
|
|||||||
mAccessToken = savedInstanceState.getString(ACCESS_TOKEN_STATE);
|
mAccessToken = savedInstanceState.getString(ACCESS_TOKEN_STATE);
|
||||||
mAccountName = savedInstanceState.getString(ACCOUNT_NAME_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) {
|
if (!mNullAccessToken && mAccessToken == null) {
|
||||||
getCurrentAccountAndBindView(filter);
|
getCurrentAccountAndBindView(filter);
|
||||||
} else {
|
} else {
|
||||||
|
mFragment = getSupportFragmentManager().getFragment(savedInstanceState, FRAGMENT_OUT_STATE);
|
||||||
|
getSupportFragmentManager().beginTransaction().replace(R.id.frame_layout_filtered_posts_activity, mFragment).commit();
|
||||||
bindView(filter, false);
|
bindView(filter, false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -114,6 +114,7 @@ public class SearchSubredditsResultActivity extends BaseActivity implements Acti
|
|||||||
mNullAccessToken = savedInstanceState.getBoolean(NULL_ACCESS_TOKEN_STATE);
|
mNullAccessToken = savedInstanceState.getBoolean(NULL_ACCESS_TOKEN_STATE);
|
||||||
mAccessToken = savedInstanceState.getString(ACCESS_TOKEN_STATE);
|
mAccessToken = savedInstanceState.getString(ACCESS_TOKEN_STATE);
|
||||||
mAccountName = savedInstanceState.getString(ACCOUNT_NAME_STATE);
|
mAccountName = savedInstanceState.getString(ACCOUNT_NAME_STATE);
|
||||||
|
|
||||||
if (!mNullAccessToken && mAccessToken == null) {
|
if (!mNullAccessToken && mAccessToken == null) {
|
||||||
getCurrentAccountAndInitializeFragment(query);
|
getCurrentAccountAndInitializeFragment(query);
|
||||||
} else {
|
} else {
|
||||||
|
@ -133,12 +133,11 @@ public class SubredditSelectionActivity extends BaseActivity implements Activity
|
|||||||
mAccountName = savedInstanceState.getString(ACCOUNT_NAME_STATE);
|
mAccountName = savedInstanceState.getString(ACCOUNT_NAME_STATE);
|
||||||
mAccountProfileImageUrl = savedInstanceState.getString(ACCOUNT_PROFILE_IMAGE_URL);
|
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) {
|
if (!mNullAccessToken && mAccountName == null) {
|
||||||
getCurrentAccountAndBindView();
|
getCurrentAccountAndBindView();
|
||||||
} else {
|
} else {
|
||||||
|
mFragment = getSupportFragmentManager().getFragment(savedInstanceState, FRAGMENT_OUT_STATE);
|
||||||
|
getSupportFragmentManager().beginTransaction().replace(R.id.frame_layout_subreddit_selection_activity, mFragment).commit();
|
||||||
bindView(false);
|
bindView(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -158,11 +158,11 @@ public class ViewMultiRedditDetailActivity extends BaseActivity implements SortT
|
|||||||
mAccountName = savedInstanceState.getString(ACCOUNT_NAME_STATE);
|
mAccountName = savedInstanceState.getString(ACCOUNT_NAME_STATE);
|
||||||
isInLazyMode = savedInstanceState.getBoolean(IS_IN_LAZY_MODE_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) {
|
if (!mNullAccessToken && mAccessToken == null) {
|
||||||
getCurrentAccountAndInitializeFragment();
|
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 {
|
} else {
|
||||||
getCurrentAccountAndInitializeFragment();
|
getCurrentAccountAndInitializeFragment();
|
||||||
|
Loading…
Reference in New Issue
Block a user