From c3d56b173181d605ecc5d026e0cb69e17516472f Mon Sep 17 00:00:00 2001 From: Vojtech Novak Date: Tue, 24 Jul 2018 17:12:42 +0200 Subject: [PATCH] reverse order for better readability --- .../RNFirebaseNotifications.java | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/android/src/main/java/io/invertase/firebase/notifications/RNFirebaseNotifications.java b/android/src/main/java/io/invertase/firebase/notifications/RNFirebaseNotifications.java index 2672c8dc..92e564ee 100644 --- a/android/src/main/java/io/invertase/firebase/notifications/RNFirebaseNotifications.java +++ b/android/src/main/java/io/invertase/firebase/notifications/RNFirebaseNotifications.java @@ -315,21 +315,6 @@ public class RNFirebaseNotifications extends ReactContextBaseJavaModule implemen 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) { String body = notification.getBody(); 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 { @Override public void onReceive(Context context, Intent intent) {