properly update foreground selector color if changed

This commit is contained in:
tibbi 2016-12-26 18:53:27 +01:00
parent 100c5c7805
commit 74dd400731

View file

@ -90,6 +90,11 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
override fun onResume() {
super.onResume()
tryloadGallery()
if (DirectoryAdapter.foregroundColor != config.primaryColor) {
DirectoryAdapter.foregroundColor = config.primaryColor
setupAdapter()
}
}
override fun onPause() {
@ -317,6 +322,10 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
}
mDirs = dirs
setupAdapter()
}
private fun setupAdapter() {
val adapter = DirectoryAdapter(this, mDirs, this) {
itemClicked(it.path)
}