Skip to content

Commit 732dcba

Browse files
committed
Fix crash when adding a feed without an icon
1 parent 74d0c50 commit 732dcba

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/src/main/java/me/ash/reader/infrastructure/rss/FetchedFeed.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import rust.nostr.sdk.getNip05Profile
2020
import java.time.Duration
2121

2222
sealed interface FetchedFeed {
23-
fun getIconLink(): String
23+
fun getIconLink(): String?
2424
//The function below is for compatibility with SyndFeed
25-
fun getIconUrl(): String
25+
fun getIconUrl(): String?
2626
fun getFeedLink(): String
2727
var title: String
2828
fun getFeedAuthor(): String
@@ -33,11 +33,11 @@ class SyndFeedDelegate(
3333
private val syndFeed: SyndFeed
3434
): FetchedFeed {
3535

36-
override fun getIconLink(): String {
36+
override fun getIconLink(): String? {
3737
return syndFeed.icon.link
3838
}
3939

40-
override fun getIconUrl(): String {
40+
override fun getIconUrl(): String? {
4141
return syndFeed.icon.url
4242
}
4343

@@ -276,4 +276,4 @@ class NostrFeedResult(
276276
var feedTitle: String,
277277
val authorPictureLink: String,
278278
val articles: List<Event>
279-
)
279+
)

0 commit comments

Comments
 (0)