|
@@ -228,7 +228,14 @@ public class ContentsFragment extends FragmentBase<ContentsPresenter> implements
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public boolean dispatchBackPressed() {
|
|
public boolean dispatchBackPressed() {
|
|
|
|
|
+ if (null == layoutManager || null == recyclerViewContentsDetail) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
ContentsHolder holder = (ContentsHolder) recyclerViewContentsDetail.findViewHolderForAdapterPosition(layoutManager.findFirstVisibleItemPosition());
|
|
ContentsHolder holder = (ContentsHolder) recyclerViewContentsDetail.findViewHolderForAdapterPosition(layoutManager.findFirstVisibleItemPosition());
|
|
|
|
|
+ if (null == holder) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
return holder.dispatchBackPressed();
|
|
return holder.dispatchBackPressed();
|
|
|
}
|
|
}
|
|
|
|
|
|