Karn / notify

Simplified notification construction and delivery for Android.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NotificationChannelInterop.with add 3 to alerting.channelImportance

NLLAPPS opened this issue · comments

Hi, what is the reason for "+3" in this line?
NotificationChannel(alerting.channelKey, alerting.channelName, alerting.channelImportance + 3)

Hey @NLLAPPS! This is done because the channel importance is set with accordance to the legacy importance that was used before Notification channels were introduced. The +3 is a quick way to keep the same scheme and be forward-compatible since the value of the channel is exposed as an "enum".