修改群内是否允许添加好友
This commit is contained in:
@@ -47,8 +47,8 @@ android {
|
|||||||
applicationId = "com.dskj.rbchat"
|
applicationId = "com.dskj.rbchat"
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
targetSdk = 34
|
targetSdk = 34
|
||||||
versionCode = 195
|
versionCode = 196
|
||||||
versionName = "1.9.5"
|
versionName = "1.9.6"
|
||||||
multiDexEnabled = true
|
multiDexEnabled = true
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
manifestPlaceholders["IMAPPKEY"] = "c38c8bbebf7d12992d2a361bfceb6c6f" //正式
|
manifestPlaceholders["IMAPPKEY"] = "c38c8bbebf7d12992d2a361bfceb6c6f" //正式
|
||||||
@@ -126,8 +126,8 @@ android {
|
|||||||
"\"AIzaSyB7P1o1EIA02eWoNP_7QJ9XwWe3WkSZb9k\""
|
"\"AIzaSyB7P1o1EIA02eWoNP_7QJ9XwWe3WkSZb9k\""
|
||||||
)
|
)
|
||||||
//测试APPKEY
|
//测试APPKEY
|
||||||
// manifestPlaceholders["IMAPPKEY"] = "4cb6b0998f9e7af9d7673963e429959a"
|
manifestPlaceholders["IMAPPKEY"] = "4cb6b0998f9e7af9d7673963e429959a"
|
||||||
manifestPlaceholders["IMAPPKEY"] = "c38c8bbebf7d12992d2a361bfceb6c6f"
|
// manifestPlaceholders["IMAPPKEY"] = "c38c8bbebf7d12992d2a361bfceb6c6f"
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public class ContactGroupSettingActivity extends FunBaseSelectorDataActivity imp
|
|||||||
FunContactSelectorSettingActivityBinding binding;
|
FunContactSelectorSettingActivityBinding binding;
|
||||||
protected FunContactMembersAdapter membersAdapter;
|
protected FunContactMembersAdapter membersAdapter;
|
||||||
protected boolean isChecked = true;
|
protected boolean isChecked = true;
|
||||||
protected boolean isAllow = true;
|
protected boolean isAllow = false;
|
||||||
protected ArrayList<String> listkey;
|
protected ArrayList<String> listkey;
|
||||||
protected ArrayList<String> listname;
|
protected ArrayList<String> listname;
|
||||||
protected ArrayList<String> listavat;
|
protected ArrayList<String> listavat;
|
||||||
|
|||||||
@@ -118,10 +118,10 @@ public class TeamMembersListActivity extends BaseTeamQrSettingActivity {
|
|||||||
if (!TextUtils.isEmpty(teamInfo.getExtension())) {
|
if (!TextUtils.isEmpty(teamInfo.getExtension())) {
|
||||||
extensionBean = GsonUtils.getObjFromJSON(teamInfo.getExtension(), TeamExtensionBean.class);
|
extensionBean = GsonUtils.getObjFromJSON(teamInfo.getExtension(), TeamExtensionBean.class);
|
||||||
if (extensionBean == null) {
|
if (extensionBean == null) {
|
||||||
extensionBean = new TeamExtensionBean(Integer.parseInt(teamInfo.getExtension()), 1);
|
extensionBean = new TeamExtensionBean(Integer.parseInt(teamInfo.getExtension()), 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
extensionBean = new TeamExtensionBean(1, 1);
|
extensionBean = new TeamExtensionBean(1, 0);
|
||||||
}
|
}
|
||||||
isAllowAdd = extensionBean.getAllowAddFriends();
|
isAllowAdd = extensionBean.getAllowAddFriends();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,14 +173,15 @@ public class TeamOtherSettingActivity extends BaseSettingOtherActivity {
|
|||||||
if (!TextUtils.isEmpty(extension)) {
|
if (!TextUtils.isEmpty(extension)) {
|
||||||
extensionBean = GsonUtils.getObjFromJSON(extension, TeamExtensionBean.class);
|
extensionBean = GsonUtils.getObjFromJSON(extension, TeamExtensionBean.class);
|
||||||
if (extensionBean == null) {
|
if (extensionBean == null) {
|
||||||
extensionBean = new TeamExtensionBean(Integer.parseInt(extension), 1);
|
extensionBean = new TeamExtensionBean(Integer.parseInt(extension), 0);
|
||||||
}
|
}
|
||||||
binding.swichTeamqr.setChecked(extensionBean.getShowQrCode() == 1);
|
|
||||||
} else {
|
} else {
|
||||||
extensionBean = new TeamExtensionBean(1, 1);
|
extensionBean = new TeamExtensionBean(1, 0);
|
||||||
}
|
}
|
||||||
|
binding.swichTeamqr.setChecked(extensionBean.getShowQrCode() == 1);
|
||||||
|
binding.swichTeamallowaddfriends.setChecked(extensionBean.getAllowAddFriends() == 1);
|
||||||
binding.swichAddtype.setChecked(team.getTeamBeInviteMode().getValue() == 1);
|
binding.swichAddtype.setChecked(team.getTeamBeInviteMode().getValue() == 1);
|
||||||
binding.tvTeamallowaddfriends.setText(extensionBean.getAllowAddFriends() == 1 ? getString(R.string.teamsetting_other_teamallow) : getString(R.string.teamsetting_other_teamallow_not));
|
// binding.tvTeamallowaddfriends.setText(extensionBean.getAllowAddFriends() == 1 ? getString(R.string.teamsetting_other_teamallow) : getString(R.string.teamsetting_other_teamallow_not));
|
||||||
Map<TeamFieldEnum, Serializable> map = new HashMap<>();
|
Map<TeamFieldEnum, Serializable> map = new HashMap<>();
|
||||||
binding.swichTeamqr.setOnClickListener(view -> {
|
binding.swichTeamqr.setOnClickListener(view -> {
|
||||||
//onclick check 变更
|
//onclick check 变更
|
||||||
@@ -189,6 +190,11 @@ public class TeamOtherSettingActivity extends BaseSettingOtherActivity {
|
|||||||
map.put(TeamFieldEnum.Extension, GsonUtils.beanToJSONString(extensionBean));
|
map.put(TeamFieldEnum.Extension, GsonUtils.beanToJSONString(extensionBean));
|
||||||
teammodel.UpdateTeamFilesExtension(team.getId(), map);
|
teammodel.UpdateTeamFilesExtension(team.getId(), map);
|
||||||
});
|
});
|
||||||
|
binding.swichTeamallowaddfriends.setOnClickListener(v -> {
|
||||||
|
extensionBean.setAllowAddFriends(binding.swichTeamallowaddfriends.isChecked() ? 1 : 0);
|
||||||
|
map.put(TeamFieldEnum.Extension, GsonUtils.beanToJSONString(extensionBean));
|
||||||
|
teammodel.UpdateTeamFilesExtension(team.getId(), map);
|
||||||
|
});
|
||||||
|
|
||||||
binding.swichAddtype.setOnClickListener(view -> {
|
binding.swichAddtype.setOnClickListener(view -> {
|
||||||
map.put(TeamFieldEnum.BeInviteMode, binding.swichAddtype.isChecked() ? TeamBeInviteModeEnum.NoAuth : TeamBeInviteModeEnum.NeedAuth);
|
map.put(TeamFieldEnum.BeInviteMode, binding.swichAddtype.isChecked() ? TeamBeInviteModeEnum.NoAuth : TeamBeInviteModeEnum.NeedAuth);
|
||||||
|
|||||||
@@ -346,10 +346,10 @@ public class TeamSettingActivity extends BaseTeamQrSettingActivity {
|
|||||||
if (!TextUtils.isEmpty(teamInfo.getExtension())) {
|
if (!TextUtils.isEmpty(teamInfo.getExtension())) {
|
||||||
extensionBean = GsonUtils.getObjFromJSON(teamInfo.getExtension(), TeamExtensionBean.class);
|
extensionBean = GsonUtils.getObjFromJSON(teamInfo.getExtension(), TeamExtensionBean.class);
|
||||||
if (extensionBean == null) {
|
if (extensionBean == null) {
|
||||||
extensionBean = new TeamExtensionBean(Integer.parseInt(teamInfo.getExtension()), 1);
|
extensionBean = new TeamExtensionBean(Integer.parseInt(teamInfo.getExtension()), 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
extensionBean = new TeamExtensionBean(1, 1);
|
extensionBean = new TeamExtensionBean(1, 0);
|
||||||
}
|
}
|
||||||
isTeamShow = (extensionBean.getShowQrCode() == 1);
|
isTeamShow = (extensionBean.getShowQrCode() == 1);
|
||||||
// if (!TextUtils.isEmpty(teamInfo.getExtension()) && teamInfo.getExtension().equals("0")) {
|
// if (!TextUtils.isEmpty(teamInfo.getExtension()) && teamInfo.getExtension().equals("0")) {
|
||||||
|
|||||||
@@ -650,9 +650,6 @@ public class MainActivity extends BaseActivity {
|
|||||||
ALog.d(Constant.PROJECT_TAG, "MainActivity:initView");
|
ALog.d(Constant.PROJECT_TAG, "MainActivity:initView");
|
||||||
loadConfig();
|
loadConfig();
|
||||||
List<Fragment> fragments = new ArrayList<>();
|
List<Fragment> fragments = new ArrayList<>();
|
||||||
shareDateUtils = new ShareDateUtils();
|
|
||||||
shareDateUtils.getAllSessionList();
|
|
||||||
shareDateUtils.getLocFriends();
|
|
||||||
// index2Fragment = new HomeFragment();
|
// index2Fragment = new HomeFragment();
|
||||||
chatTabFragment = new ChatTabFragment();
|
chatTabFragment = new ChatTabFragment();
|
||||||
// voomFragment = new VoomFragment();
|
// voomFragment = new VoomFragment();
|
||||||
@@ -671,6 +668,9 @@ public class MainActivity extends BaseActivity {
|
|||||||
mCurrentTab = activityMainBinding.contactBtnGroup;
|
mCurrentTab = activityMainBinding.contactBtnGroup;
|
||||||
resetTabSkin(isCommonSkin);
|
resetTabSkin(isCommonSkin);
|
||||||
checkZhiWen();
|
checkZhiWen();
|
||||||
|
shareDateUtils = new ShareDateUtils();
|
||||||
|
shareDateUtils.getAllSessionList();
|
||||||
|
shareDateUtils.getLocFriends();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkZhiWen() {
|
private void checkZhiWen() {
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import com.dskj.rbchat.databinding.FragmentChatconversationBinding;
|
|||||||
import com.dskj.rbchat.event.ConversationEditEvent;
|
import com.dskj.rbchat.event.ConversationEditEvent;
|
||||||
import com.dskj.rbchat.main.MainActivity;
|
import com.dskj.rbchat.main.MainActivity;
|
||||||
import com.dskj.rbchat.model.NotifyCountBean;
|
import com.dskj.rbchat.model.NotifyCountBean;
|
||||||
|
import com.dskj.rbchat.model.TeamUpdateEvent;
|
||||||
import com.dskj.rbchat.network.Api;
|
import com.dskj.rbchat.network.Api;
|
||||||
import com.dskj.rbchat.network.BaseObserver;
|
import com.dskj.rbchat.network.BaseObserver;
|
||||||
import com.dskj.rbchat.network.Result;
|
import com.dskj.rbchat.network.Result;
|
||||||
@@ -51,6 +52,7 @@ import com.netease.yunxin.kit.alog.ALog;
|
|||||||
import com.netease.yunxin.kit.chatkit.model.ConversationInfo;
|
import com.netease.yunxin.kit.chatkit.model.ConversationInfo;
|
||||||
import com.netease.yunxin.kit.chatkit.model.UserInfoWithTeam;
|
import com.netease.yunxin.kit.chatkit.model.UserInfoWithTeam;
|
||||||
import com.netease.yunxin.kit.chatkit.repo.ContactRepo;
|
import com.netease.yunxin.kit.chatkit.repo.ContactRepo;
|
||||||
|
import com.netease.yunxin.kit.chatkit.repo.ConversationRepo;
|
||||||
import com.netease.yunxin.kit.chatkit.ui.ChatUIConstants;
|
import com.netease.yunxin.kit.chatkit.ui.ChatUIConstants;
|
||||||
import com.netease.yunxin.kit.chatkit.ui.data.ChatDatabase;
|
import com.netease.yunxin.kit.chatkit.ui.data.ChatDatabase;
|
||||||
import com.netease.yunxin.kit.chatkit.ui.data.dao.ChatDraftDataDao;
|
import com.netease.yunxin.kit.chatkit.ui.data.dao.ChatDraftDataDao;
|
||||||
@@ -77,6 +79,7 @@ import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
|||||||
import com.netease.yunxin.kit.corekit.im.model.FriendInfo;
|
import com.netease.yunxin.kit.corekit.im.model.FriendInfo;
|
||||||
import com.netease.yunxin.kit.corekit.im.model.UserInfo;
|
import com.netease.yunxin.kit.corekit.im.model.UserInfo;
|
||||||
import com.netease.yunxin.kit.corekit.route.XKitRouter;
|
import com.netease.yunxin.kit.corekit.route.XKitRouter;
|
||||||
|
import com.netease.yunxin.kit.teamkit.ui.utils.viewmodel.TeamSettingViewModel;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
@@ -121,7 +124,7 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
|||||||
private Observer<FetchResult<List<String>>> aitObserver;
|
private Observer<FetchResult<List<String>>> aitObserver;
|
||||||
private Observer<FetchResult<Integer>> unreadCountObserver;
|
private Observer<FetchResult<Integer>> unreadCountObserver;
|
||||||
private ChatDraftDataDao dataDao;
|
private ChatDraftDataDao dataDao;
|
||||||
|
// public final TeamSettingViewModel teammodel = new TeamSettingViewModel();
|
||||||
|
|
||||||
protected final EventNotify<ChangeChatDraftEvent> changeDraftEvent =
|
protected final EventNotify<ChangeChatDraftEvent> changeDraftEvent =
|
||||||
new EventNotify<ChangeChatDraftEvent>() {
|
new EventNotify<ChangeChatDraftEvent>() {
|
||||||
@@ -269,6 +272,18 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
|||||||
|
|
||||||
private void queryTeamInfo() {
|
private void queryTeamInfo() {
|
||||||
for (String groupId : groupIds) {
|
for (String groupId : groupIds) {
|
||||||
|
// teammodel
|
||||||
|
// .getTeamWithMemberData()
|
||||||
|
// .observe(
|
||||||
|
// this,
|
||||||
|
// teamResultInfo -> {
|
||||||
|
// if (teamResultInfo.getValue() == null || !teamResultInfo.getSuccess()) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// Team team = teamResultInfo.getValue().getTeam();
|
||||||
|
// addShiJieConversation(team);
|
||||||
|
// });
|
||||||
|
// teammodel.requestTeamData(groupId);
|
||||||
NIMClient.getService(TeamService.class).searchTeam(groupId).setCallback(new RequestCallback<Team>() {
|
NIMClient.getService(TeamService.class).searchTeam(groupId).setCallback(new RequestCallback<Team>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Team result) {
|
public void onSuccess(Team result) {
|
||||||
@@ -314,8 +329,9 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
|||||||
conversationBean.isShiJie = true;
|
conversationBean.isShiJie = true;
|
||||||
conversationBean.infoData.setTeamInfo(team);
|
conversationBean.infoData.setTeamInfo(team);
|
||||||
conversationBean.infoData.setStickTop(true);
|
conversationBean.infoData.setStickTop(true);
|
||||||
List<ConversationBean> list = new ArrayList<>();
|
|
||||||
if (conversationType == 0) {
|
if (conversationType == 0) {
|
||||||
|
List<ConversationBean> list = new ArrayList<>();
|
||||||
boolean isAdd = false;
|
boolean isAdd = false;
|
||||||
for (ConversationBean conversationBean1 : conversationViewTop.getAdatper().getConversationList()) {
|
for (ConversationBean conversationBean1 : conversationViewTop.getAdatper().getConversationList()) {
|
||||||
Team team1 = conversationBean1.infoData.getTeamInfo();
|
Team team1 = conversationBean1.infoData.getTeamInfo();
|
||||||
@@ -329,11 +345,18 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
|||||||
}
|
}
|
||||||
if (!isAdd) {
|
if (!isAdd) {
|
||||||
list.add(conversationBean);
|
list.add(conversationBean);
|
||||||
conversationViewTop.addData(list);
|
if (conversationViewTop.getAdatper().getConversationList().size() == 0) {
|
||||||
conversationViewTop.addStickTop(team.getId());
|
conversationViewTop.addStickTop(team.getId());
|
||||||
|
conversationViewTop.setData(list);
|
||||||
|
} else {
|
||||||
|
conversationViewTop.addData(list);
|
||||||
|
conversationViewTop.addStickTop(team.getId());
|
||||||
|
}
|
||||||
|
// Collections.sort(conversationViewTop.getAdatper().getConversationList(), conversationShiJieComparator);
|
||||||
|
// conversationViewTop.setData(conversationViewTop.getAdatper().getConversationList());
|
||||||
}
|
}
|
||||||
} else if (conversationType == 2) {
|
|
||||||
|
|
||||||
|
} else if (conversationType == 2) {
|
||||||
ConversationBean conversationBeanItem = null;
|
ConversationBean conversationBeanItem = null;
|
||||||
|
|
||||||
for (ConversationBean conversationBean1 : conversationViewTop.getAdatper().getConversationList()) {
|
for (ConversationBean conversationBean1 : conversationViewTop.getAdatper().getConversationList()) {
|
||||||
@@ -361,6 +384,7 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
|||||||
for (ConversationBean conversationBean1 : conversationViewShiJie.getAdatper().getConversationList()) {
|
for (ConversationBean conversationBean1 : conversationViewShiJie.getAdatper().getConversationList()) {
|
||||||
if (conversationBean1.infoData.getContactId().equals(team.getId())) {
|
if (conversationBean1.infoData.getContactId().equals(team.getId())) {
|
||||||
conversationBean1.infoData.setStickTop(true);
|
conversationBean1.infoData.setStickTop(true);
|
||||||
|
conversationBean1.infoData.setTeamInfo(team);
|
||||||
conversationBean1.isShiJie = true;
|
conversationBean1.isShiJie = true;
|
||||||
isAdd = true;
|
isAdd = true;
|
||||||
break;
|
break;
|
||||||
@@ -368,15 +392,16 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
|||||||
}
|
}
|
||||||
if (!isAdd) {
|
if (!isAdd) {
|
||||||
if (conversationBeanItem != null) {
|
if (conversationBeanItem != null) {
|
||||||
list.add(conversationBeanItem);
|
listGuanfangTeam.add(conversationBeanItem);
|
||||||
} else {
|
} else {
|
||||||
list.add(conversationBean); //有时候这个创建的空会话数据不全
|
listGuanfangTeam.add(conversationBean); //有时候这个创建的空会话数据不全
|
||||||
}
|
}
|
||||||
conversationViewShiJie.addData(list);
|
|
||||||
conversationViewShiJie.addStickTop(team.getId());
|
conversationViewShiJie.addStickTop(team.getId());
|
||||||
|
conversationViewShiJie.addData(listGuanfangTeam);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
doEmptyView();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -460,6 +485,7 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
getServicesData();
|
getServicesData();
|
||||||
|
LogUtils.d("shijie", "changeObserver==" + changeObserver);
|
||||||
setUpdateViewData(conversationType, result.getData());
|
setUpdateViewData(conversationType, result.getData());
|
||||||
} else if (result.getLoadStatus() == LoadStatus.Finish
|
} else if (result.getLoadStatus() == LoadStatus.Finish
|
||||||
&& result.getType() == FetchResult.FetchType.Remove) {
|
&& result.getType() == FetchResult.FetchType.Remove) {
|
||||||
@@ -517,7 +543,7 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
|||||||
LogUtils.d("shijie", "更新群组信息" + result.getData().size() + " conversation size==" + conversationViewTop.getDataSize());
|
LogUtils.d("shijie", "更新群组信息" + result.getData().size() + " conversation size==" + conversationViewTop.getDataSize());
|
||||||
conversationViewTop.updateTeamInfo(result.getData());
|
conversationViewTop.updateTeamInfo(result.getData());
|
||||||
} else if (conversationType == 2) {
|
} else if (conversationType == 2) {
|
||||||
// updateShiJieTeamInfo(result.getData());
|
// updateShiJieTeamInfo(result.getData());
|
||||||
LogUtils.d("shijie", "更新群组信息" + result.getData().size() + " conversationshijie size==" + conversationViewShiJie.getDataSize());
|
LogUtils.d("shijie", "更新群组信息" + result.getData().size() + " conversationshijie size==" + conversationViewShiJie.getDataSize());
|
||||||
conversationViewTop.updateTeamInfoType(result.getData(), true);
|
conversationViewTop.updateTeamInfoType(result.getData(), true);
|
||||||
conversationViewBottom.updateTeamInfoType(result.getData(), false);
|
conversationViewBottom.updateTeamInfoType(result.getData(), false);
|
||||||
@@ -743,13 +769,13 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
|||||||
switch (conversationType) {
|
switch (conversationType) {
|
||||||
case 0:
|
case 0:
|
||||||
List<ConversationBean> listconversation = updateServicesConversation(result.getData());
|
List<ConversationBean> listconversation = updateServicesConversation(result.getData());
|
||||||
// if (chatTabParentFragment.groupIds != null) { //添加世界聊天窗口
|
if (groupIds != null) { //添加世界聊天窗口
|
||||||
// LogUtils.d("shijie", "添加世界聊天==" + chatTabParentFragment.groupIds.size());
|
List<ConversationBean> conversationShiJieList = addConversationTeamShiJie(listconversation);
|
||||||
// List<ConversationBean> conversationShiJieList = addConversationTeamShiJie(listconversation);
|
LogUtils.d("shijie", "添加世界聊天==" + conversationShiJieList.size());
|
||||||
// LogUtils.d("shijie", "添加世界聊天==" + conversationShiJieList.size());
|
listconversation.addAll(conversationShiJieList);
|
||||||
// listconversation.addAll(conversationShiJieList);
|
}
|
||||||
// }
|
|
||||||
// Collections.sort(listconversation, conversationShiJieComparator);
|
// Collections.sort(listconversation, conversationShiJieComparator);
|
||||||
|
Collections.sort(listconversation, conversationShiJieComparator);
|
||||||
conversationViewTop.setData(listconversation);
|
conversationViewTop.setData(listconversation);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
@@ -758,6 +784,7 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
getConversationTeamTypeList(result.getData());
|
getConversationTeamTypeList(result.getData());
|
||||||
|
LogUtils.d("shijie", "添加世界聊天 qunzu==" + listGuanfangTeam.size());
|
||||||
setChatDraftDataList(listMyTeam);
|
setChatDraftDataList(listMyTeam);
|
||||||
setChatDraftDataList(listJoinTeam);
|
setChatDraftDataList(listJoinTeam);
|
||||||
setChatDraftDataList(listGuanfangTeam);
|
setChatDraftDataList(listGuanfangTeam);
|
||||||
@@ -769,35 +796,32 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// //在已有的会话中添加世界聊天会话
|
//在已有的会话中添加世界聊天会话
|
||||||
// public List<ConversationBean> addConversationTeamShiJie(List<ConversationBean> recentContactList) {
|
public List<ConversationBean> addConversationTeamShiJie(List<ConversationBean> recentContactList) {
|
||||||
// List<ConversationBean> listconversation = new ArrayList<>();
|
List<ConversationBean> listconversation = new ArrayList<>();
|
||||||
// for (int i = 0; i < chatTabParentFragment.groupIds.size(); i++) {
|
for (int i = 0; i < groupIds.size(); i++) {
|
||||||
// boolean isAdd = false;
|
boolean isAdd = false;
|
||||||
// for (ConversationBean conversationBean : recentContactList) {
|
for (ConversationBean conversationBean : recentContactList) {
|
||||||
// if (conversationBean.infoData.getContactId().equals(chatTabParentFragment.groupIds.get(i))) {
|
if (conversationBean.infoData.getContactId().equals(groupIds.get(i))) {
|
||||||
// conversationBean.isShiJie = true;
|
conversationBean.isShiJie = true;
|
||||||
// conversationBean.infoData.setStickTop(true);
|
conversationBean.infoData.setStickTop(true);
|
||||||
// isAdd = true;
|
isAdd = true;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// if (!isAdd) {
|
if (!isAdd) {
|
||||||
// RecentContact recentContact = NIMClient.getService(MsgService.class).createEmptyRecentContact(chatTabParentFragment.groupIds.get(i), SessionTypeEnum.Team, 0, System.currentTimeMillis(), true, true);
|
RecentContact recentContact = NIMClient.getService(MsgService.class).createEmptyRecentContact(groupIds.get(i), SessionTypeEnum.Team, 0, System.currentTimeMillis(), true, true);
|
||||||
// ConversationInfo info = new ConversationInfo(recentContact);
|
ConversationInfo info = new ConversationInfo(recentContact);
|
||||||
// if (chatTabParentFragment.teamInfos.size() > 0) {
|
info.setStickTop(true);
|
||||||
// info.setTeamInfo(chatTabParentFragment.teamInfos.get(i));
|
ConversationBean conversationBean = new ConversationBean(info);
|
||||||
// }
|
conversationBean.isShiJie = true;
|
||||||
// info.setStickTop(true);
|
listconversation.add(conversationBean);
|
||||||
// ConversationBean conversationBean = new ConversationBean(info);
|
}
|
||||||
// conversationBean.isShiJie = true;
|
|
||||||
// listconversation.add(conversationBean);
|
}
|
||||||
// }
|
return listconversation;
|
||||||
//
|
|
||||||
// }
|
|
||||||
// return listconversation;
|
}
|
||||||
//
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// // 設置包含世界聊天
|
// // 設置包含世界聊天
|
||||||
|
|||||||
@@ -255,14 +255,16 @@
|
|||||||
android:textColor="@color/color_333333"
|
android:textColor="@color/color_333333"
|
||||||
android:textSize="@dimen/text_size_16" />
|
android:textSize="@dimen/text_size_16" />
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
android:id="@+id/tv_teamallowaddfriends"
|
android:id="@+id/swich_teamallowaddfriends"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dimen_24_dp"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
android:layout_gravity="end|center_vertical"
|
android:layout_gravity="end|center_vertical"
|
||||||
android:text="@string/teamsetting_other_teamallow"
|
android:checked="true"
|
||||||
android:textColor="@color/color_7f7b81"
|
android:thumb="@drawable/switch_thumb_selector"
|
||||||
android:textSize="@dimen/sp_14" />
|
app:track="@drawable/switch_track_selector" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -195,10 +195,10 @@ public class FunChatTeamFragment extends FunChatFragment {
|
|||||||
if (!TextUtils.isEmpty(teamInfo.getExtension())) {
|
if (!TextUtils.isEmpty(teamInfo.getExtension())) {
|
||||||
extensionBean = GsonUtils.getObjFromJSON(teamInfo.getExtension(), TeamExtensionBean.class);
|
extensionBean = GsonUtils.getObjFromJSON(teamInfo.getExtension(), TeamExtensionBean.class);
|
||||||
if (extensionBean == null) {
|
if (extensionBean == null) {
|
||||||
extensionBean = new TeamExtensionBean(Integer.parseInt(teamInfo.getExtension()), 1);
|
extensionBean = new TeamExtensionBean(Integer.parseInt(teamInfo.getExtension()), 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
extensionBean = new TeamExtensionBean(1, 1);
|
extensionBean = new TeamExtensionBean(1, 0);
|
||||||
}
|
}
|
||||||
isAllowAd = extensionBean.getAllowAddFriends();
|
isAllowAd = extensionBean.getAllowAddFriends();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public interface ApiService {
|
|||||||
/**
|
/**
|
||||||
* 测试环境
|
* 测试环境
|
||||||
*/
|
*/
|
||||||
// String URL = "https://api-test.letschat2023.com/";
|
// String URL = "https://api-test.letschat2023.com/";
|
||||||
|
|
||||||
|
|
||||||
String SUBSTATIONID = "1703655363476242434";
|
String SUBSTATIONID = "1703655363476242434";
|
||||||
|
|||||||
@@ -169,7 +169,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/dimen_24_dp"
|
android:layout_height="@dimen/dimen_24_dp"
|
||||||
android:layout_marginEnd="@dimen/dimen_15_dp"
|
android:layout_marginEnd="@dimen/dimen_15_dp"
|
||||||
android:checked="true"
|
android:checked="false"
|
||||||
android:thumb="@drawable/switch_thumb_selector"
|
android:thumb="@drawable/switch_thumb_selector"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tvgroup_addFriends"
|
app:layout_constraintTop_toBottomOf="@+id/tvgroup_addFriends"
|
||||||
|
|||||||
Reference in New Issue
Block a user