|
|
@ -95,7 +95,7 @@ internal fun SearchRoute(
|
|
|
|
onInterestsClick = onInterestsClick,
|
|
|
|
onInterestsClick = onInterestsClick,
|
|
|
|
onSearchQueryChanged = searchViewModel::onSearchQueryChanged,
|
|
|
|
onSearchQueryChanged = searchViewModel::onSearchQueryChanged,
|
|
|
|
onTopicClick = onTopicClick,
|
|
|
|
onTopicClick = onTopicClick,
|
|
|
|
onNewsResourcesCheckedChanged = forYouViewModel::updateNewsResourceSaved
|
|
|
|
onNewsResourcesCheckedChanged = forYouViewModel::updateNewsResourceSaved,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -192,7 +192,6 @@ fun EmptySearchResultBody(
|
|
|
|
onInterestsClick()
|
|
|
|
onInterestsClick()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -202,7 +201,7 @@ private fun SearchResultBody(
|
|
|
|
newsResources: List<UserNewsResource>,
|
|
|
|
newsResources: List<UserNewsResource>,
|
|
|
|
onFollowButtonClick: (String, Boolean) -> Unit,
|
|
|
|
onFollowButtonClick: (String, Boolean) -> Unit,
|
|
|
|
onNewsResourcesCheckedChanged: (String, Boolean) -> Unit = { _, _ -> },
|
|
|
|
onNewsResourcesCheckedChanged: (String, Boolean) -> Unit = { _, _ -> },
|
|
|
|
onTopicClick: (String) -> Unit = {}
|
|
|
|
onTopicClick: (String) -> Unit = {},
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
if (topics.isNotEmpty()) {
|
|
|
|
if (topics.isNotEmpty()) {
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
@ -217,7 +216,7 @@ private fun SearchResultBody(
|
|
|
|
topics = topics,
|
|
|
|
topics = topics,
|
|
|
|
onTopicClick = onTopicClick,
|
|
|
|
onTopicClick = onTopicClick,
|
|
|
|
onFollowButtonClick = onFollowButtonClick,
|
|
|
|
onFollowButtonClick = onFollowButtonClick,
|
|
|
|
withBottomSpacer = false
|
|
|
|
withBottomSpacer = false,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -246,7 +245,7 @@ private fun SearchResultBody(
|
|
|
|
newsFeed(
|
|
|
|
newsFeed(
|
|
|
|
feedState = NewsFeedUiState.Success(feed = newsResources),
|
|
|
|
feedState = NewsFeedUiState.Success(feed = newsResources),
|
|
|
|
onNewsResourcesCheckedChanged = onNewsResourcesCheckedChanged,
|
|
|
|
onNewsResourcesCheckedChanged = onNewsResourcesCheckedChanged,
|
|
|
|
onTopicClick = onTopicClick
|
|
|
|
onTopicClick = onTopicClick,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -347,7 +346,7 @@ private fun EmptySearchResultColumnPreview() {
|
|
|
|
@DevicePreviews
|
|
|
|
@DevicePreviews
|
|
|
|
@Composable
|
|
|
|
@Composable
|
|
|
|
private fun SearchScreenPreview(
|
|
|
|
private fun SearchScreenPreview(
|
|
|
|
@PreviewParameter(SearchResultUiStatePreviewParameterProvider::class)
|
|
|
|
@PreviewParameter(SearchUiStatePreviewParameterProvider::class)
|
|
|
|
searchResultUiState: SearchResultUiState,
|
|
|
|
searchResultUiState: SearchResultUiState,
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
NiaTheme {
|
|
|
|
NiaTheme {
|
|
|
|