Fix crash in alarm fragment

This commit is contained in:
Naveen Singh
2025-04-14 19:37:49 +05:30
parent d54e7175c7
commit 9485d2b4a6

View File

@@ -154,9 +154,12 @@ class AlarmFragment : Fragment(), ToggleAlarmInterface {
}
} else {
currAdapter.apply {
val context = context
updatePrimaryColor()
updateBackgroundColor(requireContext().getProperBackgroundColor())
updateTextColor(requireContext().getProperTextColor())
if (context != null) {
updateBackgroundColor(context.getProperBackgroundColor())
updateTextColor(context.getProperTextColor())
}
updateItems(alarms)
}
}