mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
add some null checks to checking if primary color changed
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user