mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Fix crash when trying to edit individual file name in multiple upload
Don't try to disable menu items when they don't exist
This commit is contained in:
parent
1be36cb16c
commit
0e1297fe45
1 changed files with 9 additions and 9 deletions
|
|
@ -138,7 +138,6 @@ public class MediaDetailPagerFragment extends SherlockFragment implements ViewPa
|
|||
if(!editable) { // Disable menu options for editable views
|
||||
menu.clear(); // see http://stackoverflow.com/a/8495697/17865
|
||||
inflater.inflate(R.menu.fragment_image_detail, menu);
|
||||
}
|
||||
if(pager != null) {
|
||||
MediaDetailProvider provider = (MediaDetailProvider)getSherlockActivity();
|
||||
Media m = provider.getMediaAtPosition(pager.getCurrentItem());
|
||||
|
|
@ -150,6 +149,7 @@ public class MediaDetailPagerFragment extends SherlockFragment implements ViewPa
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void showImage(int i) {
|
||||
pager.setCurrentItem(i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue