mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-27 06:57:59 +01:00
properly update foreground selector color if changed
This commit is contained in:
parent
100c5c7805
commit
74dd400731
1 changed files with 9 additions and 0 deletions
|
@ -90,6 +90,11 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
tryloadGallery()
|
tryloadGallery()
|
||||||
|
|
||||||
|
if (DirectoryAdapter.foregroundColor != config.primaryColor) {
|
||||||
|
DirectoryAdapter.foregroundColor = config.primaryColor
|
||||||
|
setupAdapter()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
|
@ -317,6 +322,10 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
}
|
}
|
||||||
mDirs = dirs
|
mDirs = dirs
|
||||||
|
|
||||||
|
setupAdapter()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setupAdapter() {
|
||||||
val adapter = DirectoryAdapter(this, mDirs, this) {
|
val adapter = DirectoryAdapter(this, mDirs, this) {
|
||||||
itemClicked(it.path)
|
itemClicked(it.path)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue