Commit 8f766bc1 authored by Varun Patil's avatar Varun Patil

Hide feed add event button when no role

parent c39136bd
......@@ -86,11 +86,6 @@ public class FeedFragment extends BaseFragment {
@Override
public void onStart() {
super.onStart();
fab.setVisibility(View.VISIBLE);
if (((MainActivity) getActivity()).createEventAccess()) {
fab.setVisibility(View.VISIBLE);
}
appDatabase = AppDatabase.getAppDatabase(getContext());
new showEventsFromDB().execute();
......@@ -126,6 +121,10 @@ public class FeedFragment extends BaseFragment {
/* Skip if we're already destroyed */
if (getActivity() == null || getView() == null) return;
if (((MainActivity) getActivity()).createEventAccess()) {
fab.setVisibility(View.VISIBLE);
}
final FeedAdapter feedAdapter = new FeedAdapter(events, new ItemClickListener() {
@Override
public void onItemClick(View v, int position) {
......
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