Skip to content

Commit 8e926e3

Browse files
committed
fix: guard empty url
1 parent 4207694 commit 8e926e3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

app/src/main/java/to/bitkit/ui/screens/widgets/headlines/HeadlineCard.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ fun HeadlineCard(
4444
.clip(shape = MaterialTheme.shapes.medium)
4545
.background(Colors.White10)
4646
.clickableAlpha {
47+
if (link.isEmpty()) return@clickableAlpha
4748
val intent = Intent(Intent.ACTION_VIEW, link.toUri())
4849
context.startActivity(intent)
4950
}
@@ -105,6 +106,7 @@ fun HeadlineCardSmall(
105106
.clip(shape = MaterialTheme.shapes.medium)
106107
.background(Colors.White10)
107108
.clickableAlpha {
109+
if (link.isEmpty()) return@clickableAlpha
108110
val intent = Intent(Intent.ACTION_VIEW, link.toUri())
109111
context.startActivity(intent)
110112
}

0 commit comments

Comments
 (0)