mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
add some null checks to checking if primary color changed
This commit is contained in:
parent
87b722bac3
commit
55f6f934ff
2 changed files with 2 additions and 2 deletions
|
@ -194,7 +194,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
}
|
||||
|
||||
private fun checkIfColorChanged() {
|
||||
if (getRecyclerAdapter().foregroundColor != config.primaryColor) {
|
||||
if (directories_grid.adapter != null && getRecyclerAdapter().foregroundColor != config.primaryColor) {
|
||||
getRecyclerAdapter().updatePrimaryColor(config.primaryColor)
|
||||
directories_fastscroller.updateHandleColor()
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
}
|
||||
|
||||
private fun checkIfColorChanged() {
|
||||
if (getRecyclerAdapter().foregroundColor != config.primaryColor) {
|
||||
if (media_grid.adapter != null && getRecyclerAdapter().foregroundColor != config.primaryColor) {
|
||||
getRecyclerAdapter().updatePrimaryColor(config.primaryColor)
|
||||
media_fastscroller.updateHandleColor()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue