mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-06-05 17:00:23 +02:00
adding a null check
This commit is contained in:
@ -91,10 +91,13 @@ class ChecklistFragment : NoteFragment(), ChecklistItemsListener {
|
||||
}
|
||||
|
||||
private fun setupFragment() {
|
||||
if (activity == null || activity!!.isFinishing) {
|
||||
return
|
||||
}
|
||||
|
||||
val plusIcon = resources.getColoredDrawableWithColor(R.drawable.ic_plus_vector, if (activity!!.isBlackAndWhiteTheme()) Color.BLACK else Color.WHITE)
|
||||
|
||||
view.apply {
|
||||
with(checklist_fab) {
|
||||
view.checklist_fab.apply {
|
||||
setImageDrawable(plusIcon)
|
||||
background.applyColorFilter(activity!!.getAdjustedPrimaryColor())
|
||||
setOnClickListener {
|
||||
@ -102,14 +105,13 @@ class ChecklistFragment : NoteFragment(), ChecklistItemsListener {
|
||||
}
|
||||
}
|
||||
|
||||
with(fragment_placeholder_2) {
|
||||
view.fragment_placeholder_2.apply {
|
||||
setTextColor(activity!!.getAdjustedPrimaryColor())
|
||||
underlineText()
|
||||
setOnClickListener {
|
||||
showNewItemDialog()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setupAdapter()
|
||||
}
|
||||
|
Reference in New Issue
Block a user