mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Fix bookmark crash fix (#2047)
* Fix bookmark crash fix * Fix check for bookmark creator
This commit is contained in:
parent
f2d271af37
commit
2e29f4f7f9
2 changed files with 2 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ public class BookmarkPicturesController {
|
||||||
for (Bookmark bookmark : bookmarks) {
|
for (Bookmark bookmark : bookmarks) {
|
||||||
List<Media> tmpMedias = mediaWikiApi.searchImages(bookmark.getMediaName(), 0);
|
List<Media> tmpMedias = mediaWikiApi.searchImages(bookmark.getMediaName(), 0);
|
||||||
for (Media m : tmpMedias) {
|
for (Media m : tmpMedias) {
|
||||||
if (m.getCreator().equals(bookmark.getMediaCreator())) {
|
if (m.getCreator().trim().equals(bookmark.getMediaCreator().trim())) {
|
||||||
medias.add(m);
|
medias.add(m);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -271,7 +271,7 @@ public class MediaDetailPagerFragment extends CommonsDaggerSupportFragment imple
|
||||||
menu.clear(); // see http://stackoverflow.com/a/8495697/17865
|
menu.clear(); // see http://stackoverflow.com/a/8495697/17865
|
||||||
inflater.inflate(R.menu.fragment_image_detail, menu);
|
inflater.inflate(R.menu.fragment_image_detail, menu);
|
||||||
if (pager != null) {
|
if (pager != null) {
|
||||||
MediaDetailProvider provider = (MediaDetailProvider) getParentFragment();
|
MediaDetailProvider provider = getMediaDetailProvider();
|
||||||
if(provider == null) {
|
if(provider == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue