fix(community): improvements to community list and detail
This commit is contained in:
parent
9787bc533f
commit
2b9dfa799b
@ -299,6 +299,7 @@ class CommunityDetailScreen(
|
|||||||
},
|
},
|
||||||
style = MaterialTheme.typography.headlineSmall,
|
style = MaterialTheme.typography.headlineSmall,
|
||||||
)
|
)
|
||||||
|
if (!isOnOtherInstance) {
|
||||||
Button(
|
Button(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.align(Alignment.CenterHorizontally)
|
.align(Alignment.CenterHorizontally)
|
||||||
@ -336,6 +337,7 @@ class CommunityDetailScreen(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
items(uiState.posts, key = { it.id.toString() + it.myVote }) { post ->
|
items(uiState.posts, key = { it.id.toString() + it.myVote }) { post ->
|
||||||
val dismissState = rememberDismissState(
|
val dismissState = rememberDismissState(
|
||||||
confirmStateChange = {
|
confirmStateChange = {
|
||||||
|
@ -85,7 +85,11 @@ class CommunityListViewModel(
|
|||||||
val items = communityRepository.getSubscribed(
|
val items = communityRepository.getSubscribed(
|
||||||
auth = auth,
|
auth = auth,
|
||||||
).filter {
|
).filter {
|
||||||
|
if (searchText.isNotBlank()) {
|
||||||
it.name.contains(searchText)
|
it.name.contains(searchText)
|
||||||
|
} else {
|
||||||
|
true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
currentPage++
|
currentPage++
|
||||||
mvi.updateState {
|
mvi.updateState {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user