Merge pull request #1341 from vonovak/patch-1
simplify obtaining notification title and body
This commit is contained in:
commit
0a714fe465
|
@ -323,10 +323,8 @@ public class RNFirebaseNotifications extends ReactContextBaseJavaModule implemen
|
|||
Context ctx = getReactApplicationContext();
|
||||
int resId = getResId(ctx, bodyLocKey);
|
||||
return ctx.getResources().getString(resId, (Object[]) bodyLocArgs);
|
||||
} else if (body != null) {
|
||||
return body;
|
||||
} else {
|
||||
return null;
|
||||
return body;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -338,10 +336,8 @@ public class RNFirebaseNotifications extends ReactContextBaseJavaModule implemen
|
|||
Context ctx = getReactApplicationContext();
|
||||
int resId = getResId(ctx, titleLocKey);
|
||||
return ctx.getResources().getString(resId, (Object[]) titleLocArgs);
|
||||
} else if (title != null) {
|
||||
return title;
|
||||
} else {
|
||||
return null;
|
||||
return title;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue