當前位置: 首頁>>代碼示例>>Java>>正文


Java GetGroupMemberResponse類代碼示例

本文整理匯總了Java中com.lqr.wechat.model.response.GetGroupMemberResponse的典型用法代碼示例。如果您正苦於以下問題:Java GetGroupMemberResponse類的具體用法?Java GetGroupMemberResponse怎麽用?Java GetGroupMemberResponse使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


GetGroupMemberResponse類屬於com.lqr.wechat.model.response包,在下文中一共展示了GetGroupMemberResponse類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: fetchGroupMembers

import com.lqr.wechat.model.response.GetGroupMemberResponse; //導入依賴的package包/類
/**
 * 同步群組成員信息
 */
private void fetchGroupMembers() {
    mHasFetchedGroupMembers = false;
    Observable.from(getGroups())
            .subscribeOn(Schedulers.io())
            .observeOn(Schedulers.io())
            .subscribe(groups ->
                    ApiRetrofit.getInstance().getGroupMember(groups.getGroupId())
                            .subscribe(getGroupMemberResponse -> {
                                if (getGroupMemberResponse != null && getGroupMemberResponse.getCode() == 200) {
                                    List<GetGroupMemberResponse.ResultEntity> list = getGroupMemberResponse.getResult();
                                    if (list != null && list.size() > 0) {
                                        deleteGroupMembersByGroupId(groups.getGroupId());
                                        saveGroupMembers(list, groups.getGroupId());
                                    }
                                    mHasFetchedGroupMembers = true;
                                    checkFetchComplete();
                                } else {
                                    mHasFetchedGroupMembers = true;
                                    checkFetchComplete();
                                }
                            }, this::fetchGroupMembersError));
}
 
開發者ID:starryxp,項目名稱:LQRWeChat-master,代碼行數:26,代碼來源:DBManager.java

示例2: getGroupMember

import com.lqr.wechat.model.response.GetGroupMemberResponse; //導入依賴的package包/類
public void getGroupMember(String groupId) {
    if (!mHasFetchedGroupMembers) {
        deleteGroupMembers();
        mGroupsList = getGroups();
        fetchGroupMembers();
    } else {
        ApiRetrofit.getInstance().getGroupMember(groupId)
                .subscribeOn(Schedulers.io())
                .observeOn(Schedulers.io())
                .subscribe(getGroupMemberResponse -> {
                    if (getGroupMemberResponse != null && getGroupMemberResponse.getCode() == 200) {
                        List<GetGroupMemberResponse.ResultEntity> list = getGroupMemberResponse.getResult();
                        if (list != null && list.size() > 0) {
                            deleteGroupMembersByGroupId(groupId);
                            saveGroupMembers(list, groupId);
                            BroadcastManager.getInstance(UIUtils.getContext()).sendBroadcast(AppConst.UPDATE_GROUP_MEMBER, groupId);
                            BroadcastManager.getInstance(UIUtils.getContext()).sendBroadcast(AppConst.UPDATE_CONVERSATIONS);
                        }
                    }
                }, this::loadError);
    }

}
 
開發者ID:starryxp,項目名稱:LQRWeChat-master,代碼行數:24,代碼來源:DBManager.java

示例3: setCreatedToTop

import com.lqr.wechat.model.response.GetGroupMemberResponse; //導入依賴的package包/類
private synchronized List<GroupMember> setCreatedToTop(List<GetGroupMemberResponse.ResultEntity> groupMember, String groupId) {
    List<GroupMember> newList = new ArrayList<>();
    GroupMember created = null;
    for (GetGroupMemberResponse.ResultEntity group : groupMember) {
        String groupName = null;
        String groupPortraitUri = null;
        Groups groups = getGroupsById(groupId);
        if (groups != null) {
            groupName = groups.getName();
            groupPortraitUri = groups.getPortraitUri();
        }
        GroupMember newMember = new GroupMember(groupId,
                group.getUser().getId(),
                group.getUser().getNickname(),
                group.getUser().getPortraitUri(),
                group.getDisplayName(),
                PinyinUtils.getPinyin(group.getUser().getNickname()),
                PinyinUtils.getPinyin(group.getDisplayName()),
                groupName,
                PinyinUtils.getPinyin(groupName),
                groupPortraitUri);
        if (group.getRole() == 0) {
            created = newMember;
        } else {
            newList.add(newMember);
        }
    }
    if (created != null) {
        newList.add(created);
    }
    Collections.reverse(newList);
    return newList;
}
 
開發者ID:starryxp,項目名稱:LQRWeChat-master,代碼行數:34,代碼來源:DBManager.java

示例4: getGroupMember

import com.lqr.wechat.model.response.GetGroupMemberResponse; //導入依賴的package包/類
public Observable<GetGroupMemberResponse> getGroupMember(String groupId) {
    return mApi.getGroupMember(groupId);
}
 
開發者ID:starryxp,項目名稱:LQRWeChat-master,代碼行數:4,代碼來源:ApiRetrofit.java

示例5: getGroupMember

import com.lqr.wechat.model.response.GetGroupMemberResponse; //導入依賴的package包/類
@GET("group/{groupId}/members")
Observable<GetGroupMemberResponse> getGroupMember(@Path("groupId") String groupId);
 
開發者ID:starryxp,項目名稱:LQRWeChat-master,代碼行數:3,代碼來源:MyApi.java

示例6: GetGroupMemberModel

import com.lqr.wechat.model.response.GetGroupMemberResponse; //導入依賴的package包/類
public GetGroupMemberModel(GetGroupMemberResponse getGroupMemberResponse, String groupId) {
    mGetGroupMemberResponse = getGroupMemberResponse;
    mGroupId = groupId;
}
 
開發者ID:starryxp,項目名稱:LQRWeChat-master,代碼行數:5,代碼來源:GetGroupMemberModel.java

示例7: getGetGroupMemberResponse

import com.lqr.wechat.model.response.GetGroupMemberResponse; //導入依賴的package包/類
public GetGroupMemberResponse getGetGroupMemberResponse() {
    return mGetGroupMemberResponse;
}
 
開發者ID:starryxp,項目名稱:LQRWeChat-master,代碼行數:4,代碼來源:GetGroupMemberModel.java

示例8: setGetGroupMemberResponse

import com.lqr.wechat.model.response.GetGroupMemberResponse; //導入依賴的package包/類
public void setGetGroupMemberResponse(GetGroupMemberResponse getGroupMemberResponse) {
    mGetGroupMemberResponse = getGroupMemberResponse;
}
 
開發者ID:starryxp,項目名稱:LQRWeChat-master,代碼行數:4,代碼來源:GetGroupMemberModel.java


注:本文中的com.lqr.wechat.model.response.GetGroupMemberResponse類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。