Merge pull request #1010 from giladno/patch-1

Allow passing null as a sound
This commit is contained in:
Michael Diarmid 2018-04-22 15:07:27 +01:00 committed by GitHub
commit 6dce84b0db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -560,7 +560,9 @@ public class RNFirebaseNotificationManager {
}
private Uri getSound(String sound) {
if (sound.contains("://")) {
if (sound == null)
return null;
else if (sound.contains("://")) {
return Uri.parse(sound);
} else if (sound.equalsIgnoreCase("default")) {
return RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);