11111
This commit is contained in:
parent
69977483d2
commit
8216efaba6
@ -66,6 +66,15 @@ public class InstructorRemarkManager extends BaseCacheManager {
|
||||
put(KEY_INSTRUCTOR_REMARK, json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除备注
|
||||
*/
|
||||
public void removeInstructorRemark(String key) {
|
||||
instructorRemarkMap.remove(key);
|
||||
String json = new Gson().toJson(instructorRemarkMap).toString();
|
||||
put(KEY_INSTRUCTOR_REMARK, json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 从服务器获取信息
|
||||
*/
|
||||
|
@ -9,9 +9,9 @@ ext {
|
||||
]
|
||||
manifestPlaceholders = [
|
||||
//正式
|
||||
serverHost : "https://napi.yaoulive.com",
|
||||
// serverHost : "https://napi.yaoulive.com",
|
||||
//測試
|
||||
// serverHost : "https://ceshi.yaoulive.com",
|
||||
serverHost : "https://ceshi.yaoulive.com",
|
||||
|
||||
//腾讯地图
|
||||
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",
|
||||
|
@ -52,7 +52,7 @@ public class EditNameRemarksActivity extends AbsActivity implements View.OnClick
|
||||
});
|
||||
findViewById(R.id.btn_save).setOnClickListener(this);
|
||||
String content = InstructorRemarkManager.get(mContext).getInstructorRemark().get(userId);
|
||||
if (!TextUtils.isEmpty(content)){
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
mEditText.setText(content);
|
||||
mEditText.setSelection(content.length());
|
||||
}
|
||||
@ -67,7 +67,23 @@ public class EditNameRemarksActivity extends AbsActivity implements View.OnClick
|
||||
}
|
||||
final String content = mEditText.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
ToastUtil.show(R.string.edit_profile_name_empty);
|
||||
//获取用户信息
|
||||
UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(userId);
|
||||
if (null != userInfo && !TextUtils.isEmpty(userInfo.getExtra())) {
|
||||
SearchUserBean userBean = GsonUtils.fromJson(userInfo.getExtra(), SearchUserBean.class);
|
||||
LiveHttpUtil.setInstructorRemark(userId, content, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
ToastUtil.show(msg);
|
||||
if (code == 0) {
|
||||
InstructorRemarkManager.get(mContext).removeInstructorRemark(userId);
|
||||
//刷新列表内用户信息
|
||||
addUserInfoProvider(userBean.getUserNiceName());
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -138,6 +138,7 @@ public class ConversationIMListManager {
|
||||
} else {
|
||||
userNiceName = userBean.getUserNiceName();
|
||||
}
|
||||
if (!TextUtils.isEmpty(userNiceName)&&!TextUtils.isEmpty(userBean.getAvatar())){
|
||||
UserInfo userInfo = new UserInfo(userId, userNiceName, Uri.parse(userBean.getAvatar()));
|
||||
//使用空白字段存储自己服务器用户的所有的信息
|
||||
userInfo.setExtra(GsonUtils.toJson(userBean));
|
||||
@ -145,6 +146,8 @@ public class ConversationIMListManager {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
return null;
|
||||
|
@ -31,7 +31,8 @@
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="71dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rt_main_tab"
|
||||
|
Loading…
Reference in New Issue
Block a user