From 97b5779c4acd6ee839d1ba78b1a305461b97b9fc Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Fri, 23 Mar 2018 15:47:41 +0100 Subject: [PATCH] Remove nested if --- .../java/de/danoeh/antennapod/core/feed/FeedItem.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedItem.java b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedItem.java index 8a44bedf4..87298d4c3 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedItem.java +++ b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedItem.java @@ -377,12 +377,10 @@ public class FeedItem extends FeedComponent implements ShownotesProvider, Flattr return description; } else if (TextUtils.isEmpty(description)) { return contentEncoded; + } else if (description.length() > 1.25 * contentEncoded.length()) { + return description; } else { - if (description.length() > 1.25 * contentEncoded.length()) { - return description; - } else { - return contentEncoded; - } + return contentEncoded; } }; }