fix(community): improvements to community list and detail

This commit is contained in:
Diego Beraldin 2023-08-15 18:03:50 +02:00
parent 9787bc533f
commit 2b9dfa799b
2 changed files with 38 additions and 32 deletions

View File

@ -299,6 +299,7 @@ class CommunityDetailScreen(
},
style = MaterialTheme.typography.headlineSmall,
)
if (!isOnOtherInstance) {
Button(
modifier = Modifier
.align(Alignment.CenterHorizontally)
@ -336,6 +337,7 @@ class CommunityDetailScreen(
}
}
}
}
items(uiState.posts, key = { it.id.toString() + it.myVote }) { post ->
val dismissState = rememberDismissState(
confirmStateChange = {

View File

@ -85,7 +85,11 @@ class CommunityListViewModel(
val items = communityRepository.getSubscribed(
auth = auth,
).filter {
if (searchText.isNotBlank()) {
it.name.contains(searchText)
} else {
true
}
}
currentPage++
mvi.updateState {