diff --git a/lib/main.dart b/lib/main.dart index 21c6ae5..94fffc4 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -215,7 +215,7 @@ void callbackDispatcher() { print(currentPosition); // -1 = ended - if(challenge.getBoolValue("ended") && (storedRankingState != null || storedRankingState != -1)){ + if (challenge.getBoolValue("ended") && storedRankingState != null && storedRankingState != -1) { await flutterLocalNotificationsPlugin.show(challenge.id.hashCode, "Challenge complete! ✨", "See how you finished ${challenge.getStringValue("name")} (${storedRankingState})", notificationDetails, payload: challenge.id); currentPosition = -1; } else if (isTop && (storedRankingState == null || storedRankingState > 1)) {