2
0
mirror of synced 2025-02-18 01:06:56 +00:00

Merge pull request #1341 from vonovak/patch-1

simplify obtaining notification title and body
This commit is contained in:
Michael Diarmid 2018-07-25 09:03:57 +01:00 committed by GitHub
commit 0a714fe465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -323,10 +323,8 @@ public class RNFirebaseNotifications extends ReactContextBaseJavaModule implemen
Context ctx = getReactApplicationContext(); Context ctx = getReactApplicationContext();
int resId = getResId(ctx, bodyLocKey); int resId = getResId(ctx, bodyLocKey);
return ctx.getResources().getString(resId, (Object[]) bodyLocArgs); return ctx.getResources().getString(resId, (Object[]) bodyLocArgs);
} else if (body != null) {
return body;
} else { } else {
return null; return body;
} }
} }
@ -338,10 +336,8 @@ public class RNFirebaseNotifications extends ReactContextBaseJavaModule implemen
Context ctx = getReactApplicationContext(); Context ctx = getReactApplicationContext();
int resId = getResId(ctx, titleLocKey); int resId = getResId(ctx, titleLocKey);
return ctx.getResources().getString(resId, (Object[]) titleLocArgs); return ctx.getResources().getString(resId, (Object[]) titleLocArgs);
} else if (title != null) {
return title;
} else { } else {
return null; return title;
} }
} }