Skip to content

Commit

Permalink
bump to 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
yuliskov committed Nov 8, 2020
1 parent dcba20c commit 44c1b77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions smarttubetv/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ android {
applicationId "com.liskovsoft.smarttubetv"
minSdkVersion project.properties.minSdkVersion
targetSdkVersion project.properties.targetSdkVersion
versionCode 123
versionName "8.3"
versionCode 124
versionName "8.4"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildConfigField "long", "TIMESTAMP", System.currentTimeMillis() + "L"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,13 @@ public class BrowseFragment extends BrowseSupportFragment implements BrowseView
private Handler mHandler;
private ProgressBarManager mProgressBarManager;
private boolean mIsFragmentCreated;
private int mSelectedHeaderIndex;
private int mSelectedItemIndex;
private int mSelectedHeaderIndex = -1;

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

mSelectedHeaderIndex = savedInstanceState != null ? savedInstanceState.getInt(SELECTED_HEADER_INDEX, -1) : -1;
mSelectedItemIndex = savedInstanceState != null ? savedInstanceState.getInt(SELECTED_ITEM_INDEX, -1) : -1;
mIsFragmentCreated = true;

mCategories = new LinkedHashMap<>();
Expand All @@ -75,6 +73,7 @@ public void onSaveInstanceState(Bundle outState) {

// Store position in case activity is crashed
outState.putInt(SELECTED_HEADER_INDEX, getSelectedPosition());
// Not robust. Because tab content often changed after reloading.
outState.putInt(SELECTED_ITEM_INDEX, mCategoryFragmentFactory.getCurrentFragmentItemIndex());
}

Expand All @@ -99,7 +98,6 @@ public void onActivityCreated(Bundle savedInstanceState) {

// Restore state after crash
selectCategory(mSelectedHeaderIndex);
selectItem(mSelectedItemIndex);
}

private void setupAdapter() {
Expand Down

0 comments on commit 44c1b77

Please sign in to comment.