Skip to content

Commit 68ea937

Browse files
committed
[MOB-1124] Don't log an error when notification channel name is not set
1 parent 29b7c4a commit 68ea937

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

iterableapi/src/main/java/com/iterable/iterableapi/IterableNotificationHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ private String getChannelName(Context context) {
270270
channelName = info.metaData.getString(IterableConstants.NOTIFICATION_CHANNEL_NAME);
271271

272272
// Try to read from a string resource
273-
if (channelName == null) {
274-
int stringId = info.metaData.getInt(IterableConstants.NOTIFICATION_CHANNEL_NAME);
273+
int stringId = info.metaData.getInt(IterableConstants.NOTIFICATION_CHANNEL_NAME);
274+
if (channelName == null && stringId != 0) {
275275
channelName = context.getString(stringId);
276276
}
277277
IterableLogger.d(IterableNotificationBuilder.TAG, "channel name: " + channelName);

0 commit comments

Comments
 (0)