diff options
author | Andrew Dolgov <[email protected]> | 2019-08-15 09:53:08 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-08-15 09:53:08 +0300 |
commit | 7809fa074e2ea6c4b0b4c20412fbe54a3609d36d (patch) | |
tree | 103ce0e396879a6096e11b4df9e0f899084e7a07 /org.fox.ttrss/src/main/java | |
parent | 4d2ae3f8c39ca182fcbb4583b16ed04d1a953d42 (diff) |
if previous workarounds fail, push passed first image to gallery
Diffstat (limited to 'org.fox.ttrss/src/main/java')
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryActivity.java | 3 | ||||
-rw-r--r-- | org.fox.ttrss/src/main/java/org/fox/ttrss/types/GalleryEntry.java | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryActivity.java index ebcceaf4..ca2b6a47 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryActivity.java @@ -252,7 +252,8 @@ public class GalleryActivity extends CommonActivity { // if we were unable to find first image, try again for all media content so that // gallery doesn't lock up because of a pending shared transition if (!collectGalleryContents(imgSrcFirst, doc, uncheckedItems)) - collectGalleryContents("", doc, uncheckedItems); + if (!collectGalleryContents("", doc, uncheckedItems)) + m_items.add(new GalleryEntry(imgSrcFirst, GalleryEntry.GalleryEntryType.TYPE_IMAGE, null)); } findViewById(R.id.gallery_overflow).setOnClickListener(new View.OnClickListener() { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/types/GalleryEntry.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/types/GalleryEntry.java index cb879ba6..0eb45074 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/types/GalleryEntry.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/types/GalleryEntry.java @@ -3,12 +3,22 @@ package org.fox.ttrss.types; import java.io.Serializable; public class GalleryEntry implements Serializable { - public enum GalleryEntryType { TYPE_IMAGE, TYPE_VIDEO }; + public enum GalleryEntryType { TYPE_IMAGE, TYPE_VIDEO } public String url; public GalleryEntryType type; public String coverUrl; + public GalleryEntry() { + // + } + + public GalleryEntry(String url, GalleryEntryType type, String coverUrl) { + this.url = url; + this.type = type; + this.coverUrl = coverUrl; + } + public boolean equals(GalleryEntry obj) { if (obj.url != null && url != null) { return obj.url.equals(url); |