|
|
@ -55,17 +55,20 @@ fun LazyGridScope.newsFeed(
|
|
|
|
val resourceUrl by remember {
|
|
|
|
val resourceUrl by remember {
|
|
|
|
mutableStateOf(Uri.parse(saveableNewsResource.newsResource.url))
|
|
|
|
mutableStateOf(Uri.parse(saveableNewsResource.newsResource.url))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
val savedResource by remember {
|
|
|
|
|
|
|
|
mutableStateOf(saveableNewsResource.isSaved)
|
|
|
|
|
|
|
|
}
|
|
|
|
val context = LocalContext.current
|
|
|
|
val context = LocalContext.current
|
|
|
|
val backgroundColor = MaterialTheme.colorScheme.background.toArgb()
|
|
|
|
val backgroundColor = MaterialTheme.colorScheme.background.toArgb()
|
|
|
|
|
|
|
|
|
|
|
|
NewsResourceCardExpanded(
|
|
|
|
NewsResourceCardExpanded(
|
|
|
|
newsResource = saveableNewsResource.newsResource,
|
|
|
|
newsResource = saveableNewsResource.newsResource,
|
|
|
|
isBookmarked = saveableNewsResource.isSaved,
|
|
|
|
isBookmarked = savedResource,
|
|
|
|
onClick = { launchCustomChromeTab(context, resourceUrl, backgroundColor) },
|
|
|
|
onClick = { launchCustomChromeTab(context, resourceUrl, backgroundColor) },
|
|
|
|
onToggleBookmark = {
|
|
|
|
onToggleBookmark = {
|
|
|
|
onNewsResourcesCheckedChanged(
|
|
|
|
onNewsResourcesCheckedChanged(
|
|
|
|
saveableNewsResource.newsResource.id,
|
|
|
|
saveableNewsResource.newsResource.id,
|
|
|
|
!saveableNewsResource.isSaved
|
|
|
|
!savedResource
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
|
|
|
)
|
|
|
|