Hi, is there a more Kotlin idiomatic way to write ...
# announcements
g
Hi, is there a more Kotlin idiomatic way to write the following:
Copy code
channel == null || channel.importance != NotificationManager.IMPORTANCE_NONE
I thought I could do:
Copy code
channel?.importance != NotificationManager.IMPORTANCE_NONE
But this crashes due to the function equals being called on null (NPE) when channel is null itself