diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2024-03-31 18:40:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-31 18:40:15 +0200 |
commit | edb440a5a9a05e24c344a71b272b9238217e9c55 (patch) | |
tree | 13623ca7d0dac052ac35d693aac940d0727c87f9 /storage/database/src/main | |
parent | 4e47691e70e85736c7eeb30ce02c73176e565a86 (diff) | |
download | AntennaPod-edb440a5a9a05e24c344a71b272b9238217e9c55.zip |
Restructure related UI classes together (#7044)
Diffstat (limited to 'storage/database/src/main')
-rw-r--r-- | storage/database/src/main/java/de/danoeh/antennapod/storage/database/FeedItemDuplicateGuesser.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/FeedItemDuplicateGuesser.java b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/FeedItemDuplicateGuesser.java index bbaedb519..19a2bd5f1 100644 --- a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/FeedItemDuplicateGuesser.java +++ b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/FeedItemDuplicateGuesser.java @@ -1,11 +1,11 @@ package de.danoeh.antennapod.storage.database; -import android.text.TextUtils; import de.danoeh.antennapod.model.feed.FeedItem; import de.danoeh.antennapod.model.feed.FeedMedia; import java.text.DateFormat; import java.util.Locale; +import org.apache.commons.lang3.StringUtils; /** * Publishers sometimes mess up their feed by adding episodes twice or by changing the ID of existing episodes. @@ -32,7 +32,7 @@ public class FeedItemDuplicateGuesser { } public static boolean sameAndNotEmpty(String string1, String string2) { - if (TextUtils.isEmpty(string1) || TextUtils.isEmpty(string2)) { + if (StringUtils.isEmpty(string1) || StringUtils.isEmpty(string2)) { return false; } return string1.equals(string2); @@ -45,7 +45,7 @@ public class FeedItemDuplicateGuesser { DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT, Locale.US); // MM/DD/YY String dateOriginal = dateFormat.format(item2.getPubDate()); String dateNew = dateFormat.format(item1.getPubDate()); - return TextUtils.equals(dateOriginal, dateNew); // Same date; time is ignored. + return StringUtils.equals(dateOriginal, dateNew); // Same date; time is ignored. } private static boolean durationsLookSimilar(FeedMedia media1, FeedMedia media2) { @@ -62,7 +62,7 @@ public class FeedItemDuplicateGuesser { mimeType1 = mimeType1.substring(0, mimeType1.indexOf("/")); mimeType2 = mimeType2.substring(0, mimeType2.indexOf("/")); } - return TextUtils.equals(mimeType1, mimeType2); + return StringUtils.equals(mimeType1, mimeType2); } private static boolean titlesLookSimilar(FeedItem item1, FeedItem item2) { |