You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.1 KiB
49 lines
1.1 KiB
package com.community.pocket.ui.main.ui.info;
|
|
|
|
import androidx.annotation.StringRes;
|
|
|
|
import com.community.pocket.R;
|
|
import com.community.pocket.data.model.MyInfo;
|
|
import com.community.pocket.ui.main.ui.share.ToastResponse;
|
|
import com.community.pocket.util.CustomMessage;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
|
|
/**
|
|
* 个人信息响应结果
|
|
*
|
|
*/
|
|
public class InfoResponse extends ToastResponse<InfoResponse.Msg> {
|
|
|
|
private MyInfo myInfo;
|
|
|
|
public MyInfo getMyInfo() {
|
|
return myInfo;
|
|
}
|
|
|
|
public void setMyInfo(MyInfo myInfo) {
|
|
this.myInfo = myInfo;
|
|
}
|
|
|
|
enum Msg implements CustomMessage {
|
|
ok(R.string.load_info_ok),
|
|
fail(R.string.load_info_fail),
|
|
modify_pwd_ok(R.string.modify_pwd_ok),
|
|
modify_pwd_fail(R.string.modify_pwd_fail),
|
|
modify_oldpwd_fail(R.string.modify_oldpwd_fail),
|
|
token(R.string.invalid_token);
|
|
|
|
private Integer msg;
|
|
|
|
Msg(@StringRes Integer msg) {
|
|
this.msg = msg;
|
|
}
|
|
|
|
@NotNull
|
|
@Override
|
|
public Integer getMsg() {
|
|
return msg;
|
|
}
|
|
}
|
|
}
|
|
|