private void init() { BitmapManager.getInstance().registerBitmapChangedListener(listener); service = new V2CrowdGroupRequest(); deleteMemberList = new ArrayList<User>(); long cid = getIntent().getLongExtra("cid", 0); if (activityType == GROUP_MEMBER_TYPE_CROWD) { memberGroup = GlobalHolder.getInstance().getGroupById(GroupType.CHATING.intValue(), cid); if (memberGroup.getOwnerUser().getmUserId() != GlobalHolder.getInstance().getCurrentUserId()) { mInvitationButton.setVisibility(View.INVISIBLE); } } else { mTitleTV.setText(getResources().getString(R.string.discussion_board_detail_members)); memberGroup = GlobalHolder.getInstance().getGroupById(GroupType.DISCUSSION.intValue(), cid); } mMembers = memberGroup.getUsers(); if (activityType == GROUP_MEMBER_TYPE_DISCUSSION) { sortMembers(); } adapter = new MembersAdapter(); mMembersContainer.setAdapter(adapter); }
private void updateMembersChange() { if (activityType == GROUP_MEMBER_TYPE_CROWD) { memberGroup = (CrowdGroup) GlobalHolder.getInstance() .getGroupById(GroupType.CHATING.intValue(), getIntent().getLongExtra("cid", 0)); } else { memberGroup = (DiscussionGroup) GlobalHolder.getInstance() .getGroupById( GroupType.DISCUSSION.intValue(), getIntent().getLongExtra("cid", 0)); } mMembers = memberGroup.getUsers(); adapter.notifyDataSetChanged(); }