mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-26 03:16:02 +03:00
Do not use hard wrapping.
This commit is contained in:
parent
5d190a8137
commit
4dbeaeb465
2 changed files with 5 additions and 7 deletions
|
@ -118,9 +118,9 @@ class SearchFragment @Inject constructor(
|
|||
}
|
||||
|
||||
override fun onItemClicked(event: Event) {
|
||||
event.roomId ?: return
|
||||
|
||||
navigator.openRoom(requireContext(), event.roomId!!, event.eventId)
|
||||
event.roomId?.let {
|
||||
navigator.openRoom(requireContext(), it, event.eventId)
|
||||
}
|
||||
}
|
||||
|
||||
override fun loadMore() {
|
||||
|
|
|
@ -48,9 +48,7 @@ class SearchResultController @Inject constructor(
|
|||
}
|
||||
|
||||
override fun buildModels(data: SearchViewState?) {
|
||||
data?.searchResult?.results ?: return
|
||||
|
||||
if (!data.searchResult.nextBatch.isNullOrEmpty()) {
|
||||
if (!data?.searchResult?.nextBatch.isNullOrEmpty()) {
|
||||
loadingItem {
|
||||
// Always use a different id, because we can be notified several times of visibility state changed
|
||||
id("loadMore${idx++}")
|
||||
|
@ -62,7 +60,7 @@ class SearchResultController @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
buildSearchResultItems(data.searchResult.results!!)
|
||||
buildSearchResultItems(data?.searchResult?.results.orEmpty())
|
||||
}
|
||||
|
||||
private fun buildSearchResultItems(events: List<Event>) {
|
||||
|
|
Loading…
Reference in a new issue