mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-01-30 11:14:48 +01:00
add some null checks to checking if primary color changed
This commit is contained in:
parent
87b722bac3
commit
55f6f934ff
@ -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…
x
Reference in New Issue
Block a user