Skip to content

Commit

Permalink
Fix restoring filters in right drawer after screen rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Fs00 authored and maniac103 committed Apr 23, 2023
1 parent 3b8800c commit 577cb59
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions app/src/main/java/com/gh4a/activities/IssueListActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,20 +129,21 @@ public static Intent makeIntent(Context context, String repoOwner, String repoNa

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

mUserLogin = Gh4Application.get().getAuthLogin();

// We're restoring instance state before calling super.onCreate() because some of the fields
// are used to populate the right navigation drawer, which is done in BaseActivity.onCreate()
if (savedInstanceState != null) {
mSearchQuery = savedInstanceState.getString(STATE_KEY_SEARCH_QUERY);
mSearchMode = savedInstanceState.getBoolean(STATE_KEY_SEARCH_MODE);
mSearchIsExpanded = savedInstanceState.getBoolean(STATE_KEY_SEARCH_IS_EXPANDED);
mSelectedMilestone = savedInstanceState.getString(STATE_KEY_SELECTED_MILESTONE);
mSelectedLabel = savedInstanceState.getString(STATE_KEY_SELECTED_LABEL);
mSelectedAssignee = savedInstanceState.getString(STATE_KEY_SELECTED_ASSIGNEE);
mSelectedParticipatingStatus =
savedInstanceState.getInt(STATE_KEY_PARTICIPATING_STATUS);
mSelectedParticipatingStatus = savedInstanceState.getInt(STATE_KEY_PARTICIPATING_STATUS);
}

super.onCreate(savedInstanceState);
mUserLogin = Gh4Application.get().getAuthLogin();

if (!mIsPullRequest && Gh4Application.get().isAuthorized()) {
CoordinatorLayout rootLayout = getRootLayout();
mCreateFab = (FloatingActionButton) getLayoutInflater().inflate(
Expand Down

0 comments on commit 577cb59

Please sign in to comment.