[Modify]标签功能开发
This commit is contained in:
@@ -14,6 +14,7 @@ import com.yizhuan.xchat_android_core.user.bean.ProtocolInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserDetailInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserGameInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserLabelInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserRandomConfig;
|
||||
|
||||
import java.util.List;
|
||||
@@ -231,4 +232,9 @@ public interface IUserModel extends IModel {
|
||||
|
||||
Single<String> addReport(Long objId, int type);
|
||||
|
||||
/**
|
||||
* 获取编辑标签
|
||||
*/
|
||||
Single<UserLabelInfo> getUserLabelInfo();
|
||||
|
||||
}
|
||||
|
@@ -30,6 +30,7 @@ import com.yizhuan.xchat_android_core.user.bean.ProtocolInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserDetailInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserGameInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserLabelInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserRandomConfig;
|
||||
import com.yizhuan.xchat_android_core.user.event.CurrentUserInfoCompleteEvent;
|
||||
import com.yizhuan.xchat_android_core.user.event.CurrentUserInfoCompleteFailEvent;
|
||||
@@ -820,6 +821,13 @@ public final class UserModel extends BaseModel implements IUserModel {
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<UserLabelInfo> getUserLabelInfo() {
|
||||
return api.getUserLabelInfo()
|
||||
.compose(RxHelper.handleBeanData())
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
|
||||
private interface Api {
|
||||
/**
|
||||
* 获取某个用户的用户信息
|
||||
@@ -1070,5 +1078,13 @@ public final class UserModel extends BaseModel implements IUserModel {
|
||||
@POST("/user/black/add")
|
||||
Single<ServiceResult<String>> addReport(@Query("objId") Long objId, @Query("type") int type);
|
||||
|
||||
/**
|
||||
* 编辑标签
|
||||
*
|
||||
* @return -
|
||||
*/
|
||||
@GET("/label/edit")
|
||||
Single<ServiceResult<UserLabelInfo>> getUserLabelInfo();
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,12 @@
|
||||
package com.yizhuan.xchat_android_core.user.bean
|
||||
|
||||
import lombok.Data
|
||||
import java.io.Serializable
|
||||
|
||||
@Data
|
||||
data class UserLabelInfo(
|
||||
val config: List<UserLabelItemInfo>,
|
||||
val meLabels: List<String>
|
||||
) : Serializable
|
||||
|
||||
|
@@ -0,0 +1,12 @@
|
||||
package com.yizhuan.xchat_android_core.user.bean
|
||||
|
||||
import lombok.Data
|
||||
import java.io.Serializable
|
||||
|
||||
@Data
|
||||
data class UserLabelItemInfo(
|
||||
val label: String = "",
|
||||
val picked: Boolean = false
|
||||
) : Serializable
|
||||
|
||||
|
Reference in New Issue
Block a user