Commit c460686d authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Fix for java.lang.IllegalStateException: group_no_file must not be null

parent 318eff21
...@@ -78,25 +78,26 @@ class FilesFragment : Fragment(), FilesView { ...@@ -78,25 +78,26 @@ class FilesFragment : Fragment(), FilesView {
} }
override fun showFiles(dataSet: List<FileUiModel>, total: Long) { override fun showFiles(dataSet: List<FileUiModel>, total: Long) {
setupToolbar(total) ui {
if (adapter.itemCount == 0) { setupToolbar(total)
adapter.prependData(dataSet) if (adapter.itemCount == 0) {
if (dataSet.size >= 30) { adapter.prependData(dataSet)
recycler_view.addOnScrollListener(object : if (dataSet.size >= 30) {
EndlessRecyclerViewScrollListener(linearLayoutManager) { recycler_view.addOnScrollListener(object :
override fun onLoadMore( EndlessRecyclerViewScrollListener(linearLayoutManager) {
page: Int, override fun onLoadMore(
totalItemsCount: Int, page: Int,
recyclerView: RecyclerView totalItemsCount: Int,
) { recyclerView: RecyclerView
presenter.loadFiles(chatRoomId) ) {
} presenter.loadFiles(chatRoomId)
}) }
})
}
group_no_file.isVisible = dataSet.isEmpty()
} else {
adapter.appendData(dataSet)
} }
group_no_file.isVisible = dataSet.isEmpty()
} else {
adapter.appendData(dataSet)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment