From e9933006577bdb29d7eec6d7db43ff79d2be7622 Mon Sep 17 00:00:00 2001 From: Felipe Leon Date: Wed, 3 Aug 2022 20:04:44 -0300 Subject: [PATCH] fix notification with empty display name --- .../java/com/fgl27/twitch/notification/NotificationUtils.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apk/app/src/main/java/com/fgl27/twitch/notification/NotificationUtils.java b/apk/app/src/main/java/com/fgl27/twitch/notification/NotificationUtils.java index bcf10997a..14739edac 100755 --- a/apk/app/src/main/java/com/fgl27/twitch/notification/NotificationUtils.java +++ b/apk/app/src/main/java/com/fgl27/twitch/notification/NotificationUtils.java @@ -391,6 +391,10 @@ private static void GetStreamNotifications(Map oldLive, JsonA user_id = obj.get("user_id").getAsString();//Channel id display_name = !obj.get("user_name").isJsonNull() ? obj.get("user_name").getAsString() : null; + //When stream comes online for the first time the display name may be and empty string + if (display_name.isEmpty()) { + display_name = !obj.get("user_login").isJsonNull() ? obj.get("user_login").getAsString() : null; + } if (display_name != null) {