Merge pull request #3476 from ByteHamster/fix-feed-without-identifying-value
Fixed feed without any identifying value
This commit is contained in:
commit
f3b3d5c422
|
@ -218,6 +218,8 @@ public class FeedItem extends FeedComponent implements ShownotesProvider, ImageR
|
|||
return itemIdentifier;
|
||||
} else if (title != null && !title.isEmpty()) {
|
||||
return title;
|
||||
} else if (hasMedia() && media.getDownload_url() != null) {
|
||||
return media.getDownload_url();
|
||||
} else {
|
||||
return link;
|
||||
}
|
||||
|
|
|
@ -668,6 +668,7 @@ public class DownloadService extends Service {
|
|||
Log.e(TAG, "FeedSyncThread was interrupted");
|
||||
} catch (ExecutionException e) {
|
||||
Log.e(TAG, "ExecutionException in FeedSyncThread: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -702,6 +703,7 @@ public class DownloadService extends Service {
|
|||
Log.e(TAG, "FeedSyncThread was interrupted");
|
||||
} catch (ExecutionException e) {
|
||||
Log.e(TAG, "ExecutionException in FeedSyncThread: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.content.Context;
|
|||
import android.content.SharedPreferences;
|
||||
import android.database.Cursor;
|
||||
import android.os.Looper;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -440,10 +441,9 @@ public final class DBTasks {
|
|||
/**
|
||||
* Get a FeedItem by its identifying value.
|
||||
*/
|
||||
private static FeedItem searchFeedItemByIdentifyingValue(Feed feed,
|
||||
String identifier) {
|
||||
private static FeedItem searchFeedItemByIdentifyingValue(Feed feed, String identifier) {
|
||||
for (FeedItem item : feed.getItems()) {
|
||||
if (item.getIdentifyingValue().equals(identifier)) {
|
||||
if (TextUtils.equals(item.getIdentifyingValue(), identifier)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue