Update DashOsMoFragment.java

This commit is contained in:
vshcherb 2015-06-11 13:51:07 +02:00
parent f971f17b8b
commit 1b0451aca5

View file

@ -63,7 +63,9 @@ public class DashOsMoFragment extends DashLocationFragment implements OsMoGroups
launchOsMoGroupsActivity(); launchOsMoGroupsActivity();
} }
}); });
plugin.setGroupsActivity(getActivity()); if(plugin != null) {
plugin.setGroupsActivity(getActivity());
}
setupHader(view); setupHader(view);
return view; return view;
} }
@ -164,7 +166,7 @@ public class DashOsMoFragment extends DashLocationFragment implements OsMoGroups
View cardContent = header.findViewById(R.id.card_content); View cardContent = header.findViewById(R.id.card_content);
View enableOsmo = header.findViewById(R.id.header_layout).findViewById(R.id.check_item); View enableOsmo = header.findViewById(R.id.header_layout).findViewById(R.id.check_item);
View manage = header.findViewById(R.id.manage); View manage = header.findViewById(R.id.manage);
if (plugin == null || plugin.getService().isEnabled() ) { if (plugin != null && plugin.getService().isEnabled() ) {
cardContent.setVisibility(View.VISIBLE); cardContent.setVisibility(View.VISIBLE);
enableOsmo.setVisibility(View.GONE); enableOsmo.setVisibility(View.GONE);
manage.setVisibility(View.VISIBLE); manage.setVisibility(View.VISIBLE);