make ItemsAdapter at ItemsFragment nullable

This commit is contained in:
tibbi 2017-11-09 20:44:18 +01:00
parent e68052bbbf
commit 29a746d15e
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ class ItemsFragment : Fragment(), ItemsAdapter.ItemOperationsListener, Breadcrum
val newColor = context!!.config.textColor val newColor = context!!.config.textColor
if (storedTextColor != newColor) { if (storedTextColor != newColor) {
storedItems = ArrayList() storedItems = ArrayList()
(items_list.adapter as ItemsAdapter).updateTextColor(newColor) (items_list.adapter as? ItemsAdapter)?.updateTextColor(newColor)
mView.breadcrumbs.updateColor(newColor) mView.breadcrumbs.updateColor(newColor)
storedTextColor = newColor storedTextColor = newColor
} }