File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed
app/src/main/java/com/readrops/app/item Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,8 @@ fun ItemScreenPage(
7272 ItemScreenBottomBar (
7373 state = BottomBarState (
7474 isRead = itemWithFeed.item.isRead,
75- isStarred = itemWithFeed.item.isStarred
75+ isStarred = itemWithFeed.item.isStarred,
76+ isOpenUrlVisible = ! item.link.isNullOrEmpty()
7677 ),
7778 accentColor = accentColor,
7879 modifier = Modifier
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ import com.readrops.app.util.theme.spacing
2323
2424data class BottomBarState (
2525 val isRead : Boolean = false ,
26- val isStarred : Boolean = false
26+ val isStarred : Boolean = false ,
27+ val isOpenUrlVisible : Boolean = true
2728)
2829
2930@Composable
@@ -87,14 +88,16 @@ fun ItemScreenBottomBar(
8788 )
8889 }
8990
90- IconButton (
91- onClick = onOpenUrl
92- ) {
93- Icon (
94- painter = painterResource(id = R .drawable.ic_open_in_browser),
95- tint = tint,
96- contentDescription = null
97- )
91+ if (state.isOpenUrlVisible) {
92+ IconButton (
93+ onClick = onOpenUrl
94+ ) {
95+ Icon (
96+ painter = painterResource(id = R .drawable.ic_open_in_browser),
97+ tint = tint,
98+ contentDescription = null
99+ )
100+ }
98101 }
99102 }
100103 }
You can’t perform that action at this time.
0 commit comments