diff --git a/common/src/main/java/com/yunbao/common/manager/InstructorRemarkManager.java b/common/src/main/java/com/yunbao/common/manager/InstructorRemarkManager.java
index e015845d9..ad995b8d3 100644
--- a/common/src/main/java/com/yunbao/common/manager/InstructorRemarkManager.java
+++ b/common/src/main/java/com/yunbao/common/manager/InstructorRemarkManager.java
@@ -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);
+ }
+
/**
* 从服务器获取信息
*/
diff --git a/config.gradle b/config.gradle
index eddca7244..53e2161f5 100644
--- a/config.gradle
+++ b/config.gradle
@@ -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",
diff --git a/live/src/main/java/com/yunbao/live/activity/EditNameRemarksActivity.java b/live/src/main/java/com/yunbao/live/activity/EditNameRemarksActivity.java
index feb76a789..c860d6dd9 100644
--- a/live/src/main/java/com/yunbao/live/activity/EditNameRemarksActivity.java
+++ b/live/src/main/java/com/yunbao/live/activity/EditNameRemarksActivity.java
@@ -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;
}
diff --git a/main/src/main/java/com/yunbao/main/manager/imrongcloud/ConversationIMListManager.java b/main/src/main/java/com/yunbao/main/manager/imrongcloud/ConversationIMListManager.java
index 319429288..2c5dc36c6 100644
--- a/main/src/main/java/com/yunbao/main/manager/imrongcloud/ConversationIMListManager.java
+++ b/main/src/main/java/com/yunbao/main/manager/imrongcloud/ConversationIMListManager.java
@@ -138,10 +138,13 @@ public class ConversationIMListManager {
} else {
userNiceName = userBean.getUserNiceName();
}
- UserInfo userInfo = new UserInfo(userId, userNiceName, Uri.parse(userBean.getAvatar()));
- //使用空白字段存储自己服务器用户的所有的信息
- userInfo.setExtra(GsonUtils.toJson(userBean));
- RongUserInfoManager.getInstance().refreshUserInfoCache(userInfo);
+ if (!TextUtils.isEmpty(userNiceName)&&!TextUtils.isEmpty(userBean.getAvatar())){
+ UserInfo userInfo = new UserInfo(userId, userNiceName, Uri.parse(userBean.getAvatar()));
+ //使用空白字段存储自己服务器用户的所有的信息
+ userInfo.setExtra(GsonUtils.toJson(userBean));
+ RongUserInfoManager.getInstance().refreshUserInfoCache(userInfo);
+ }
+
}
}
diff --git a/main/src/main/res/layout/activity_conversation_list.xml b/main/src/main/res/layout/activity_conversation_list.xml
index 110a24518..3da278b4a 100644
--- a/main/src/main/res/layout/activity_conversation_list.xml
+++ b/main/src/main/res/layout/activity_conversation_list.xml
@@ -31,7 +31,8 @@
+ android:layout_height="match_parent"
+ android:layout_marginBottom="71dp" />