diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2024-03-23 18:06:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-23 18:06:02 +0100 |
commit | a065d3fc338371d1e5f0782bb99a847cc5a9ea93 (patch) | |
tree | f35c487317c9b7979c02f3839dfab77681bc6de1 /model/src | |
parent | f6b45e7162ce3909cb2b04a4124e71aad22240c6 (diff) | |
download | AntennaPod-a065d3fc338371d1e5f0782bb99a847cc5a9ea93.zip |
Remove check for updated attributes, just update them (#7018)
Diffstat (limited to 'model/src')
-rw-r--r-- | model/src/main/java/de/danoeh/antennapod/model/feed/Feed.java | 66 | ||||
-rw-r--r-- | model/src/main/java/de/danoeh/antennapod/model/feed/FeedPreferences.java | 19 |
2 files changed, 0 insertions, 85 deletions
diff --git a/model/src/main/java/de/danoeh/antennapod/model/feed/Feed.java b/model/src/main/java/de/danoeh/antennapod/model/feed/Feed.java index 80ef8547f..6b7c40095 100644 --- a/model/src/main/java/de/danoeh/antennapod/model/feed/Feed.java +++ b/model/src/main/java/de/danoeh/antennapod/model/feed/Feed.java @@ -3,7 +3,6 @@ package de.danoeh.antennapod.model.feed; import android.text.TextUtils; import androidx.annotation.Nullable; -import org.apache.commons.lang3.StringUtils; import java.util.ArrayList; import java.util.Date; @@ -150,13 +149,6 @@ public class Feed { } /** - * This constructor can be used when parsing feed data. Only the 'lastUpdate' and 'items' field are initialized. - */ - public Feed() { - super(); - } - - /** * This constructor is used for requesting a feed download (it must not be used for anything else!). It should NOT be * used if the title of the feed is already known. */ @@ -257,64 +249,6 @@ public class Feed { } } - /** - * Compare's this FeedFile's attribute values with another FeedFile's - * attribute values. This method will only compare attributes which were - * read from the feed. - * - * @return true if attribute values are different, false otherwise - */ - public boolean compareWithOther(Feed other) { - if (!StringUtils.equals(downloadUrl, other.downloadUrl)) { - return true; - } - if (other.imageUrl != null) { - if (imageUrl == null || !TextUtils.equals(imageUrl, other.imageUrl)) { - return true; - } - } - if (!TextUtils.equals(feedTitle, other.feedTitle)) { - return true; - } - if (other.feedIdentifier != null) { - if (feedIdentifier == null || !feedIdentifier.equals(other.feedIdentifier)) { - return true; - } - } - if (other.link != null) { - if (link == null || !link.equals(other.link)) { - return true; - } - } - if (other.description != null) { - if (description == null || !description.equals(other.description)) { - return true; - } - } - if (other.language != null) { - if (language == null || !language.equals(other.language)) { - return true; - } - } - if (other.author != null) { - if (author == null || !author.equals(other.author)) { - return true; - } - } - if (other.fundingList != null) { - if (fundingList == null || !fundingList.equals(other.fundingList)) { - return true; - } - } - if (other.isPaged() && !this.isPaged()) { - return true; - } - if (!TextUtils.equals(other.getNextPageLink(), this.getNextPageLink())) { - return true; - } - return false; - } - public FeedItem getMostRecentItem() { // we could sort, but we don't need to, a simple search is fine... Date mostRecentDate = new Date(0); diff --git a/model/src/main/java/de/danoeh/antennapod/model/feed/FeedPreferences.java b/model/src/main/java/de/danoeh/antennapod/model/feed/FeedPreferences.java index 02f09693e..04c3849a2 100644 --- a/model/src/main/java/de/danoeh/antennapod/model/feed/FeedPreferences.java +++ b/model/src/main/java/de/danoeh/antennapod/model/feed/FeedPreferences.java @@ -150,25 +150,6 @@ public class FeedPreferences implements Serializable { } /** - * Compare another FeedPreferences with this one. The feedID, autoDownload and AutoDeleteAction attribute are excluded from the - * comparison. - * - * @return True if the two objects are different. - */ - public boolean compareWithOther(FeedPreferences other) { - if (other == null) { - return true; - } - if (!TextUtils.equals(username, other.username)) { - return true; - } - if (!TextUtils.equals(password, other.password)) { - return true; - } - return false; - } - - /** * Update this FeedPreferences object from another one. The feedID, autoDownload and AutoDeleteAction attributes are excluded * from the update. */ |