From fc1ffd87aa17ada298294cec73e5b2573d8d53fe Mon Sep 17 00:00:00 2001 From: Danilo Ercoli Date: Wed, 7 Feb 2024 19:13:14 +0100 Subject: [PATCH] Make sure blog.url is not empty before using it. --- .../wordpress/android/ui/reader/subfilter/SubfilterListItem.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/reader/subfilter/SubfilterListItem.kt b/WordPress/src/main/java/org/wordpress/android/ui/reader/subfilter/SubfilterListItem.kt index 2b005e15b809..f78c7550aee1 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/reader/subfilter/SubfilterListItem.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/reader/subfilter/SubfilterListItem.kt @@ -69,7 +69,7 @@ sealed class SubfilterListItem(val type: ItemType, val isTrackedItem: Boolean = override val label: UiString = if (blog.name.isNotEmpty()) { UiStringText(blog.name) } else { - UiStringText(UrlUtils.getHost(blog.url)) + UiStringText(if (blog.url.isNotEmpty()) UrlUtils.getHost(blog.url) else "") } val showUnseenCount: Boolean = blog.numUnseenPosts > 0 val unseenCount: Int = blog.numUnseenPosts