From e49b7b677633ddf1fb03bac662c7afd92a45c2b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patric=20Karlstr=C3=B6m?= Date: Wed, 13 Jan 2021 15:32:39 +0100 Subject: [PATCH] use contains instead of indexOf --- app/src/main/java/io/lbry/browser/LbrynetMessagingService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/lbry/browser/LbrynetMessagingService.java b/app/src/main/java/io/lbry/browser/LbrynetMessagingService.java index c4f46712..327cb45b 100644 --- a/app/src/main/java/io/lbry/browser/LbrynetMessagingService.java +++ b/app/src/main/java/io/lbry/browser/LbrynetMessagingService.java @@ -58,7 +58,7 @@ public class LbrynetMessagingService extends FirebaseMessagingService { String name = payload.get("name"); // notification name String hash = payload.get("hash"); // comment hash - if (type != null && getEnabledTypes().indexOf(type) > -1 && body != null && body.trim().length() > 0) { + if (type != null && getEnabledTypes().contains(type) && body != null && body.trim().length() > 0) { // only log the receive event for valid notifications received if (firebaseAnalytics != null) { Bundle bundle = new Bundle();