use contains instead of indexOf

This commit is contained in:
Patric Karlström 2021-01-13 15:32:39 +01:00
parent 1ca2b92855
commit e49b7b6776

View file

@ -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();