Remove redundant mutable state

pull/1067/head
Ben Trengrove 12 months ago
parent eb54ec71e9
commit 3142ecb495

@ -30,9 +30,6 @@ import androidx.compose.foundation.lazy.staggeredgrid.StaggeredGridCells
import androidx.compose.foundation.lazy.staggeredgrid.items
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalContext
@ -64,9 +61,6 @@ fun LazyStaggeredGridScope.newsFeed(
key = { it.id },
contentType = { "newsFeedItem" },
) { userNewsResource ->
val resourceUrl by remember {
mutableStateOf(Uri.parse(userNewsResource.url))
}
val context = LocalContext.current
val analyticsHelper = LocalAnalyticsHelper.current
val backgroundColor = MaterialTheme.colorScheme.background.toArgb()
@ -79,7 +73,8 @@ fun LazyStaggeredGridScope.newsFeed(
analyticsHelper.logNewsResourceOpened(
newsResourceId = userNewsResource.id,
)
launchCustomChromeTab(context, resourceUrl, backgroundColor)
launchCustomChromeTab(context, Uri.parse(userNewsResource.url), backgroundColor)
onNewsResourceViewed(userNewsResource.id)
},
hasBeenViewed = userNewsResource.hasBeenViewed,

Loading…
Cancel
Save