Commit a9560fcb authored by Sajal Narang's avatar Sajal Narang
parents 8152623f e8d90ea4
...@@ -65,7 +65,7 @@ public class FeedAdapter extends RecyclerView.Adapter<FeedAdapter.ViewHolder> { ...@@ -65,7 +65,7 @@ public class FeedAdapter extends RecyclerView.Adapter<FeedAdapter.ViewHolder> {
if (timestamp != null) { if (timestamp != null) {
Date Date = new Date(timestamp.getTime()); Date Date = new Date(timestamp.getTime());
SimpleDateFormat simpleDateFormatDate = new SimpleDateFormat("dd MMM"); SimpleDateFormat simpleDateFormatDate = new SimpleDateFormat("dd MMM");
SimpleDateFormat simpleDateFormatTime = new SimpleDateFormat("HH:mm a"); SimpleDateFormat simpleDateFormatTime = new SimpleDateFormat("HH:mm");
subtitle += simpleDateFormatDate.format(Date) + " | " + simpleDateFormatTime.format(Date); subtitle += simpleDateFormatDate.format(Date) + " | " + simpleDateFormatTime.format(Date);
} }
......
...@@ -132,17 +132,22 @@ public class BodyFragment extends BackHandledFragment { ...@@ -132,17 +132,22 @@ public class BodyFragment extends BackHandledFragment {
super.onStart(); super.onStart();
/* Initialize */ /* Initialize */
bodyDisplayed = false;
appDatabase = AppDatabase.getAppDatabase(getContext()); appDatabase = AppDatabase.getAppDatabase(getContext());
body = min_body; body = min_body;
displayBody(); displayBody();
new getDbBody().execute(min_body.getBodyID());
updateBody(); /* Check if full body was passed */
if (min_body.getBodyDescription() == null) {
new getDbBody().execute(min_body.getBodyID());
updateBody();
}
bodySwipeRefreshLayout = getActivity().findViewById(R.id.body_swipe_refresh_layout); bodySwipeRefreshLayout = getActivity().findViewById(R.id.body_swipe_refresh_layout);
bodySwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { bodySwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override @Override
public void onRefresh() { public void onRefresh() {
bodyDisplayed = false;
updateBody(); updateBody();
} }
}); });
......
...@@ -151,7 +151,7 @@ public class EventFragment extends BackHandledFragment { ...@@ -151,7 +151,7 @@ public class EventFragment extends BackHandledFragment {
Timestamp timestamp = event.getEventStartTime(); Timestamp timestamp = event.getEventStartTime();
Date Date = new Date(timestamp.getTime()); Date Date = new Date(timestamp.getTime());
SimpleDateFormat simpleDateFormatDate = new SimpleDateFormat("dd MMM"); SimpleDateFormat simpleDateFormatDate = new SimpleDateFormat("dd MMM");
SimpleDateFormat simpleDateFormatTime = new SimpleDateFormat("HH:mm a"); SimpleDateFormat simpleDateFormatTime = new SimpleDateFormat("HH:mm");
eventDate.setText(simpleDateFormatDate.format(Date)); eventDate.setText(simpleDateFormatDate.format(Date));
eventTime.setText(simpleDateFormatTime.format(Date)); eventTime.setText(simpleDateFormatTime.format(Date));
StringBuilder eventVenueName = new StringBuilder(); StringBuilder eventVenueName = new StringBuilder();
......
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