From 9901337f86848d24128646d4ac2a3decf4ab9411 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Wed, 1 Aug 2018 09:48:54 +0200 Subject: [PATCH] Display error if groups information can not be retrieved. --- .../comunic/client/ui/fragments/NotificationsFragment.java | 6 ++++++ app/src/main/res/values/strings.xml | 1 + 2 files changed, 7 insertions(+) diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/NotificationsFragment.java b/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/NotificationsFragment.java index d828ee0..4f9b204 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/NotificationsFragment.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/NotificationsFragment.java @@ -263,6 +263,12 @@ public class NotificationsFragment extends Fragment implements View.OnCreateCont return; } + //Check if we could not get information about related gropus + if(notifs.getGroupsInfo() == null){ + Toast.makeText(getActivity(), R.string.err_get_groups_info, Toast.LENGTH_SHORT).show(); + return; + } + //Save the list of notifications and display it mNotificationsList = notifs; displayNotificationsList(); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 12e361c..7b84d80 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -201,4 +201,5 @@ Close navigation drawer My Page on the page of the group %1$s + Could not get information about groups!