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();
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user