Skip to content

Commit

Permalink
Fix crash when viewing statistics repeatedly (I think)
Browse files Browse the repository at this point in the history
  • Loading branch information
autoreleasefool committed Sep 27, 2018
1 parent d9f1648 commit 2b2211f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ abstract class ListFragment<Item : IIdentifiable, Adapter : BaseRecyclerViewAdap
}

private fun updateEmptyView() {
if (view == null) { return }

if (items.isEmpty()) {
list.visibility = View.GONE
emptyView.apply {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class StatisticsUnitDetailsFragment : BaseFragment(),
if (savedInstanceState == null) {
val fragment = StatisticsListFragment.newInstance(unit)
childFragmentManager.beginTransaction().apply {
add(R.id.fragment_container, fragment)
replace(R.id.fragment_container, fragment)
commit()
}
}
Expand Down

0 comments on commit 2b2211f

Please sign in to comment.