reverse order for better readability
This commit is contained in:
parent
b0fc98d0e6
commit
c3d56b1731
@ -315,21 +315,6 @@ public class RNFirebaseNotifications extends ReactContextBaseJavaModule implemen
|
|||||||
return notificationMap;
|
return notificationMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
private @Nullable String getNotificationTitle(RemoteMessage.Notification notification) {
|
|
||||||
String title = notification.getTitle();
|
|
||||||
String titleLocKey = notification.getTitleLocalizationKey();
|
|
||||||
if (titleLocKey != null) {
|
|
||||||
String[] titleLocArgs = notification.getTitleLocalizationArgs();
|
|
||||||
Context ctx = getReactApplicationContext();
|
|
||||||
int resId = getResId(ctx, titleLocKey);
|
|
||||||
return ctx.getResources().getString(resId, (Object[]) titleLocArgs);
|
|
||||||
} else if (title != null) {
|
|
||||||
return title;
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private @Nullable String getNotificationBody(RemoteMessage.Notification notification) {
|
private @Nullable String getNotificationBody(RemoteMessage.Notification notification) {
|
||||||
String body = notification.getBody();
|
String body = notification.getBody();
|
||||||
String bodyLocKey = notification.getBodyLocalizationKey();
|
String bodyLocKey = notification.getBodyLocalizationKey();
|
||||||
@ -345,6 +330,21 @@ public class RNFirebaseNotifications extends ReactContextBaseJavaModule implemen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private @Nullable String getNotificationTitle(RemoteMessage.Notification notification) {
|
||||||
|
String title = notification.getTitle();
|
||||||
|
String titleLocKey = notification.getTitleLocalizationKey();
|
||||||
|
if (titleLocKey != null) {
|
||||||
|
String[] titleLocArgs = notification.getTitleLocalizationArgs();
|
||||||
|
Context ctx = getReactApplicationContext();
|
||||||
|
int resId = getResId(ctx, titleLocKey);
|
||||||
|
return ctx.getResources().getString(resId, (Object[]) titleLocArgs);
|
||||||
|
} else if (title != null) {
|
||||||
|
return title;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private class RemoteNotificationReceiver extends BroadcastReceiver {
|
private class RemoteNotificationReceiver extends BroadcastReceiver {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user