Commit 7a5c9e12 authored by Varun Patil's avatar Varun Patil

Close bottom sheet on notification tap

parent cf0ba177
......@@ -15,12 +15,16 @@ import app.insti.api.model.Event;
import app.insti.api.model.Notification;
import app.insti.api.model.PlacementBlogPost;
import app.insti.fragment.NewsFragment;
import app.insti.fragment.NotificationsFragment;
import app.insti.fragment.PlacementBlogFragment;
import app.insti.fragment.TrainingBlogFragment;
public class NotificationsAdapter extends CardAdapter<Notification> {
NotificationsFragment notificationsFragment;
public NotificationsAdapter(List<Notification> notifications, Fragment fragment) {
super(notifications, fragment);
notificationsFragment = (NotificationsFragment) fragment;
}
@Override
......@@ -30,6 +34,9 @@ public class NotificationsAdapter extends CardAdapter<Notification> {
String sessId = Utils.getSessionIDHeader();
retrofitInterface.markNotificationRead(sessId, notification.getNotificationId().toString()).enqueue(new EmptyCallback<Void>());
/* Close the bottom sheet */
notificationsFragment.dismiss();
/* Open event */
if (notification.isEvent()) {
Gson gson = new Gson();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment