|
|
|
|
@ -429,27 +429,37 @@ public class HomeActivity extends BaseActivity { |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void onBackPressed() { |
|
|
|
|
int i; |
|
|
|
|
if (this.fragments.size() <= 0 || this.sortFocused >= this.fragments.size() || (i = this.sortFocused) < 0) { |
|
|
|
|
exit(); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
BaseLazyFragment baseLazyFragment = this.fragments.get(i); |
|
|
|
|
if (baseLazyFragment instanceof GridFragment) { |
|
|
|
|
View view = this.sortFocusView; |
|
|
|
|
GridFragment grid = (GridFragment) baseLazyFragment; |
|
|
|
|
if (grid.restoreView()) { |
|
|
|
|
|
|
|
|
|
// takagen99: Add check for VOD Delete Mode
|
|
|
|
|
if (HawkConfig.hotVodDelete) { |
|
|
|
|
HawkConfig.hotVodDelete = false; |
|
|
|
|
UserFragment.homeHotVodAdapter.notifyDataSetChanged(); |
|
|
|
|
} else { |
|
|
|
|
int i; |
|
|
|
|
if (this.fragments.size() <= 0 || this.sortFocused >= this.fragments.size() || (i = this.sortFocused) < 0) { |
|
|
|
|
exit(); |
|
|
|
|
return; |
|
|
|
|
}// 还原上次保存的UI内容
|
|
|
|
|
if (view != null && !view.isFocused()) { |
|
|
|
|
this.sortFocusView.requestFocus(); |
|
|
|
|
} else if (this.sortFocused != 0) { |
|
|
|
|
} |
|
|
|
|
BaseLazyFragment baseLazyFragment = this.fragments.get(i); |
|
|
|
|
if (baseLazyFragment instanceof GridFragment) { |
|
|
|
|
View view = this.sortFocusView; |
|
|
|
|
GridFragment grid = (GridFragment) baseLazyFragment; |
|
|
|
|
if (grid.restoreView()) { |
|
|
|
|
return; |
|
|
|
|
}// 还原上次保存的UI内容
|
|
|
|
|
if (view != null && !view.isFocused()) { |
|
|
|
|
this.sortFocusView.requestFocus(); |
|
|
|
|
} else if (this.sortFocused != 0) { |
|
|
|
|
this.mGridView.setSelection(0); |
|
|
|
|
} else { |
|
|
|
|
exit(); |
|
|
|
|
} |
|
|
|
|
} else if (baseLazyFragment instanceof UserFragment && UserFragment.tvHotListForGrid.canScrollVertically(-1)) { |
|
|
|
|
UserFragment.tvHotListForGrid.scrollToPosition(0); |
|
|
|
|
this.mGridView.setSelection(0); |
|
|
|
|
} else { |
|
|
|
|
exit(); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
exit(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|